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).
system.asynchronous_metrics table now provides new metrics QueryCacheEntries and QueryCacheBytes to monitor the query cache usage.

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 the system.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.