Home > database >  MySQL have_query_cache variable value is NO
MySQL have_query_cache variable value is NO

Time:10-12


As above, why didn't I MySQL query cache, how to support the query cache?

CodePudding user response:

Query cache is used to perform a SELECT statement and results are cached in memory, each time determine whether hit the cache before you execute the query, if hit directly return the cached results, cache hit many conditions to be met, the SQL statements are exactly the same, same context, etc., unless it is actually a read-only applications, the query cache invalidation frequency is very high, any changes to the table will lead to cache invalidation; Therefore, the query cache function has been removed in MySQL 8.0, have_query_cache value is always NO, will be deleted in the future,

If you study in MySQL, welcome to come to my blog ,

CodePudding user response:

This has to do with Mysql version and Mysql configuration. Mysql8.0 remove caching capabilities,
When performing a select, I understand: in the query and the results are stored in the cache, execute the select again, efficiency is high, but if you have any other operations on the table, increase, delete, change, will clean up the table on the cache, the deposited in the cache or clear the cache of operation will also bring the Mysql performance impact, because regardless of the cache in the later version of the
  • Related