如何在MySQL中列出缓存的查询? (Qcache_queries_in_cache) [英] How to list cached queries in MySQL? (Qcache_queries_in_cache)
问题描述
显示状态如Qcache_queries_in_cache返回:
+ -------------- ----------- + ---------- +
| Variable_name |价值|
+ ------------------------- + ---------- +
| Qcache_queries_in_cache | 327 |
+ ------------------------- + ---------- +
如何打印这327个查询?
缓存我想尝试切换到按需缓存。但在我之前,我想确定哪些查询正在缓存或丢弃。我尝试了mysql docs,google和stackoverflow搜索,但没有运气。
解决方案AFAIK sql查询不会存储到Qcache 。因此,没有办法找到现在缓存的查询,执行您的一个查询,并查看值列的更改。
Show status like 'Qcache_queries_in_cache' returns:
+-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_queries_in_cache | 327 | +-------------------------+----------+
How do I print these 327 queries?
In an attempt to optimize mysql caching I want to trying switching to "on demand" caching. But before I do I want to get a definitive sense of which queries are being cached or discarded. I tried mysql docs, google, and stackoverflow search but no luck.
解决方案AFAIK sql queries are not stored into Qcache only their hash. So there is no way to find what queries are now cached exept you execute one of your query and see the changes of Value column.
这篇关于如何在MySQL中列出缓存的查询? (Qcache_queries_in_cache)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!