mysql查询缓存,以key和value的形式存储,8.0取消,命中率低
查看是否支持查询缓存
show variables like 'have_query_cache';
是否开启
show variables like 'query_cache_type';
查询缓存大下
show variables like 'query_cache_size';
查询缓存状态变量
show status like 'qcache%';
8.0之前版本,打开查询缓存
[mysqld]
query_cache_type = on
query_cache_size = 32m
重启生效