v.24.10New Feature

Add system.query_metric_log for Query Memory and Metric History

Add a new system table, system.query_metric_log which contains history of memory and metric values from table system.events for individual queries, periodically flushed to disk. #66532 (Pablo Marcos).
Introduces a new system table, system.query_metric_log, that records the history of memory usage and metric values from system.events for individual queries, periodically flushed to disk.

Why it matters

This feature enables users to track detailed memory and metric statistics per query over time, providing better insights into query resource consumption and performance trends by preserving historical data that is otherwise transient.

How to use it

Users can query the new table system.query_metric_log like any other system table to analyze historical metrics and memory usage on a per-query basis. No special configuration is needed beyond accessing this table for diagnostic or monitoring purposes.