下面这种情况,使用Qc合适吗?谢谢!






解决方案
20
从状态变量里看,似乎不容易看出来,你查一下 系统中总的select语句的数量把:
mysql> show status like “%com_select%”;
+–+–+
| Variable_name | Value |
+–+–+
| Com_select | 2 |
+–+–+
1 row in set (0.60 sec)
然后,把qcache_hits 的值 除以 这个com-select的值,就能算出命中率了,假如命中率比较低,建议不要用这个查询缓存。
mysql> show status like “%com_select%”;
+–+–+
| Variable_name | Value |
+–+–+
| Com_select | 2 |
+–+–+
1 row in set (0.60 sec)
然后,把qcache_hits 的值 除以 这个com-select的值,就能算出命中率了,假如命中率比较低,建议不要用这个查询缓存。