Pages

Friday, April 22, 2022

What is MySQL Query Caching

What is MySQL Query Caching?


MySQL Query Caching provides database caching functionality. The SELECT statement text and the retrieved result are stored in the cache. When you make a similar query to the one already in the cache, MySQL will respond and give a query already in the cache. In this way, fewer resources are used, and your query runs faster.

To check the status

show variables like 'have_query_cache';

show variables like 'query_cache_%';


To adjust in MySQL configuration file:

query_cache_type=1

query_cache_size = 10M

query_cache_limit=256k


Disable the MySQL query cache without restarting MySQL.

set global query_cache_size = 0;

No comments:

Post a Comment