mysql> show global status like 'qcache%';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Qcache_free_blocks | 87 |
| Qcache_free_memory | 222434000 |
| Qcache_hits | 266898 |
| Qcache_inserts | 16301766 |
| Qcache_lowmem_prunes | 10590473 |
| Qcache_not_cached | 29385783 |
| Qcache_queries_in_cache | 20806 |
| Qcache_total_blocks | 41712 |
+-------------------------+-----------+
8 rows in set (0.00 sec)
mysql> show variables like 'query_cache%';
+------------------------------+-----------+
| Variable_name | Value |
+------------------------------+-----------+
| query_cache_limit | 2097152 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 268435456 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+-----------+
5 rows in set (0.00 sec)我的结论是缓存命中率太低,不知是否对。
我的业务模型是一笔业务操作为:插入,查询,更新。是不是这种业务不适合缓存。mysqlcache
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| Qcache_free_blocks | 87 |
| Qcache_free_memory | 222434000 |
| Qcache_hits | 266898 |
| Qcache_inserts | 16301766 |
| Qcache_lowmem_prunes | 10590473 |
| Qcache_not_cached | 29385783 |
| Qcache_queries_in_cache | 20806 |
| Qcache_total_blocks | 41712 |
+-------------------------+-----------+
8 rows in set (0.00 sec)
mysql> show variables like 'query_cache%';
+------------------------------+-----------+
| Variable_name | Value |
+------------------------------+-----------+
| query_cache_limit | 2097152 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 268435456 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+-----------+
5 rows in set (0.00 sec)我的结论是缓存命中率太低,不知是否对。
我的业务模型是一笔业务操作为:插入,查询,更新。是不是这种业务不适合缓存。mysqlcache
我都忘了我当初遇到什么问题了。