3、认为是不同的查询并且分别进行缓存。下面sql查询缓存认为是不同的:SELECT*FROMtbl_nameSelect*fromtbl_name查询缓存相关参数 1.mysql> SHOW VARIABLES LIKE '%query_cache%'; 2.+------------------------------+---------+ 3.
27、ityEdition(GPL)Type'help;'or'h'forhelp.Type'c'toclearthebuffer.mysql> setglobalquery_cache_size=600000; --设置缓存内存QueryOK,0rowsaffected(0.00sec)mysql> setsessionquery_cache_type=ON; --开启查询缓存QueryOK,0rowsaffected(0.00sec) 1.mysql> use test 2.Reading table information
28、 for completion of table and column names 3.You can turn off this feature to get a quicker startup with -A 4. 5.Database changed 6.mysql> show tables; 7.+----------------+ 8.
29、 Tables_in_test
30、 9.+----------------+ 10.
31、 animals
32、 11.
33、 person
34、 12.+----
35、------------+ 13.5 rows in set (0.00 sec) 14. 15.mysql> select count(*) from animals; 16.+----------+ 17.