Tema: Re: mysql query cache
Autorius: johnrembo
Data: 2009-04-23 15:32:28
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1257" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702">
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=2 face=Arial>nelabai suskaitau&nbsp;tavo mintis&nbsp;zinok - 
tipo sesijos qcache settingsai&nbsp; ir globalus settingsai&nbsp;skiriasi ir as 
turiu pasirases kazkoki scripta kurio pagalba&nbsp;padarau "SET SESSION 
query_cache_type = OFF" o po to stebiuiosi kodel man rodo query_cache_type=ON, 
nors realiai jis yra OFF???</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face="Courier New">mysql&gt; show session status like 
'%qcache%';<BR>+-------------------------+----------+<BR>| 
Variable_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
Value&nbsp;&nbsp;&nbsp; |<BR>+-------------------------+----------+<BR>| 
Qcache_free_blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_free_memory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 16768384 |<BR>| 
Qcache_hits&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_inserts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_lowmem_prunes&nbsp;&nbsp;&nbsp; | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_not_cached&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| Qcache_queries_in_cache | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_total_blocks&nbsp;&nbsp;&nbsp;&nbsp; | 
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>+-------------------------+----------+<BR>8 rows in set (0.00 
sec)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face="Courier New">mysql&gt; show global status like 
'%qcache%';<BR>+-------------------------+----------+<BR>| 
Variable_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
Value&nbsp;&nbsp;&nbsp; |<BR>+-------------------------+----------+<BR>| 
Qcache_free_blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_free_memory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 16768384 |<BR>| 
Qcache_hits&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_inserts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_lowmem_prunes&nbsp;&nbsp;&nbsp; | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_not_cached&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
49&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| Qcache_queries_in_cache | 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
Qcache_total_blocks&nbsp;&nbsp;&nbsp;&nbsp; | 
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>+-------------------------+----------+<BR>8 rows in set (0.00 
sec)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"><BR>mysql&gt; show global variables like 
'query_cache%';<BR>+------------------------------+----------+<BR>| 
Variable_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| Value&nbsp;&nbsp;&nbsp; |<BR>+------------------------------+----------+<BR>| 
query_cache_limit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 1048576&nbsp; |<BR>| query_cache_min_res_unit&nbsp;&nbsp;&nbsp;&nbsp; | 
4096&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
query_cache_size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 16777216 |<BR>| 
query_cache_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| ON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| query_cache_wlock_invalidate | 
OFF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>+------------------------------+----------+<BR>5 rows in set (0.00 
sec)</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face="Courier New">mysql&gt; show session variables like 
'query_cache%';<BR>+------------------------------+----------+<BR>| 
Variable_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| Value&nbsp;&nbsp;&nbsp; |<BR>+------------------------------+----------+<BR>| 
query_cache_limit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 1048576&nbsp; |<BR>| query_cache_min_res_unit&nbsp;&nbsp;&nbsp;&nbsp; | 
4096&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| 
query_cache_size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| 16777216 |<BR>| 
query_cache_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
| ON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>| query_cache_wlock_invalidate | 
OFF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>+------------------------------+----------+<BR>5 rows in set (0.00 
sec)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>"Laimis" &lt;</FONT><A 
href="mailto:wiela@centras.lt"><FONT size=2 
face=Arial>wiela@centras.lt</FONT></A><FONT size=2 face=Arial>&gt; wrote in 
message </FONT><A href="news:gspk8f$ojo$1@trimpas.omnitel.net"><FONT size=2 
face=Arial>news:gspk8f$ojo$1@trimpas.omnitel.net</FONT></A><FONT size=2 
face=Arial>...</FONT></DIV><FONT size=2 face=Arial>&gt; johnrembo 
ra:<BR>&gt;&gt; na taip, pavyzdys mano nevykes (It refers to tables in the 
mysql or <BR>&gt;&gt; INFORMATION_SCHEMA system database. ), bet tai nekeicia 
reikalo esmes:<BR>&gt; <BR>&gt; Na ir dar syk:<BR>&gt; </FONT><A 
href="http://dev.mysql.com/doc/refman/5.1/en/query-cache-configuration.html"><FONT 
size=2 
face=Arial>http://dev.mysql.com/doc/refman/5.1/en/query-cache-configuration.html</FONT></A><BR><FONT 
size=2 face=Arial>&gt; <BR>&gt; Setting the GLOBAL query_cache_type value 
determines query cache <BR>&gt; behavior for all clients that 
connect...<BR>&gt; <BR>&gt; ?</FONT></BODY></HTML>