Wiki source for MySqlQueryCache


Show raw source

===MySQL query cache===
The MySQL query cache is disabled by default

Once you have enabled it in /etc/my.cnf
%%
query_cache_size=8M
%%

and restarted mysqld you can check its settings using

%%(sql)
mysql> show status like 'qcache%';
+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| Qcache_free_blocks | 505 |
| Qcache_free_memory | 1379664 |
| Qcache_hits | 14512295 |
| Qcache_inserts | 2372908 |
| Qcache_lowmem_prunes | 367026 |
| Qcache_not_cached | 4759779 |
| Qcache_queries_in_cache | 4784 |
| Qcache_total_blocks | 10301 |
+-------------------------+----------+
8 rows in set (0.02 sec)
%%
and
%%(sql)
mysql> show variables like 'query_cache%';
+------------------------------+----------+
| Variable_name | Value |
+------------------------------+----------+
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 16777216 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+----------+
5 rows in set (0.00 sec)
%%

MySqlQueryCacheGrowing

----
REFERRERS
{{backlinks}}
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki