v.23.8Improvement
system.asynchronous_metrics adds QueryCacheEntries and QueryCacheBytes metrics
system.asynchronous_metrics now includes metrics "QueryCacheEntries" and "QueryCacheBytes" to inspect the query cache. #52650 (Robert Schulze).Why it matters
These new metrics help users understand the size and number of entries in the query cache, allowing better insight into query performance optimization and cache utilization.How to use it
Query thesystem.asynchronous_metrics table to retrieve the QueryCacheEntries and QueryCacheBytes metrics, for example:SELECT metric, value FROM system.asynchronous_metrics WHERE metric IN ('QueryCacheEntries', 'QueryCacheBytes')This will show the current cache usage statistics.