更新时间:2022-09-22 08:35:03
mysql>SHOW GLOBAL STATUS LIKE 'QCACHE%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_hits | 0 | | Qcache_not_cached | 1 | | Qcache_queries_in_cache | 0 | +-------------------------+----------+ mysql>SELECT * FROM `Weather` WHERE `AddTime` = 1185897600;
mysql>SHOW GLOBAL STATUS LIKE 'QCACHE%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_hits | 0 | | Qcache_not_cached | 2 | | Qcache_queries_in_cache | 1 | +-------------------------+----------+ mysql>SELECT * FROM `Weather` WHERE `AddTime` = 1185897600;
mysql>SHOW GLOBAL STATUS LIKE 'QCACHE%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_hits | 1 | | Qcache_not_cached | 3 | | Qcache_queries_in_cache | 1 | +-------------------------+----------+ mysql>SELECT * FROM `Weather` WHERE `AddTime` = DATE_FORMAT(NOW(), '%Y-%m-%d');
mysql>SHOW GLOBAL STATUS LIKE 'QCACHE%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_hits | 1 | | Qcache_not_cached | 5 | | Qcache_queries_in_cache | 1 | +-------------------------+----------+ mysql>SELECT * FROM `Weather` WHERE `AddTime` = DATE_FORMAT(NOW(), '%Y-%m-%d');
mysql>SHOW GLOBAL STATUS LIKE 'QCACHE%'; +-------------------------+----------+ | Variable_name | Value | +-------------------------+----------+ | Qcache_hits | 1 | | Qcache_not_cached | 7 | | Qcache_queries_in_cache | 1 | +-------------------------+----------+