1. 变更参数 : query_cache_type   

如果何配置查询缓存:

query_cache_type 这个系统变量控制着查询缓存工能的开启的关闭。
query_cache_type=0时表示关闭,  1时表示打开,   2表示只要select 中明确指定SQL_CACHE才缓存。

可通过my.cnf手动配置 : query_cache_type=2;  然后重启mysql.

0即off,   1即on,   2即demand

MySQL优化查询 5.7版本

 

 

SELECT @@global.query_cache_type;

#显性指定查询缓存
select SQL_CACHE * from t_sys_user;

 

 

MySQL优化查询 5.7版本

MySQL优化查询 5.7版本

 

相关文章:

  • 2021-12-20
  • 2021-09-15
  • 2021-03-31
  • 2021-11-20
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2021-08-05
  • 2021-12-18
  • 2021-12-18
  • 2021-12-26
相关资源
相似解决方案