Database Management
MySQL
Subjective
Oct 01, 2025
Explain MySQL's query cache and its optimization.
Detailed Explanation
Query cache stores SELECT statement results in memory for faster retrieval.
Configuration:
query_cache_type = 1
query_cache_size = 256M
Optimization tips:
• Use identical queries
• Avoid non-deterministic functions
• Monitor cache hit ratio
• Consider disabling for write-heavy workloads
Example:
SHOW STATUS LIKE 'Qcache%';
-- Shows cache statistics and hit ratio
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts