1、优化前查询速度

 

2、优化后查询速度

 

3、优化配置

innodb_buffer_pool_size=4G
innodb_log_file_size=4G
max_connections=1024
innodb_log_buffer_size=32M
query_cache_size = 0
skip_name_resolve

innodb_flush_log_at_trx_commit=0

备注:需要重启服务器,我这个是主从同步的备服务器,所以可以重启。

 

posted on 2017-12-05 09:58  杜先生的博客  阅读(328)  评论(0编辑  收藏  举报