MySQL query caching: limited to a maximum cache size of 128 MB?

后端 未结 6 1785
北荒
北荒 2021-01-30 17:31

My application is very database intensive so I\'ve tried really hard to make sure the application and the MySQL database are working as efficiently as possible together.

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 17:45

    Be careful with setting the query_cache_size and limit to high. MySQL only uses a single thread to read from the query cache.

    With the query_cache_size set to 4G and query_cache_limit 12M we had a query cache rate of 85% but noticed a recurring spikes in connections.

    After changing the query_cache_size to 256M with 64K query_cache_limit the query cache ratio dropped to 50% but the overall performance increased.

提交回复
热议问题