v.20.8Improvement

Add QueryTimeMicroseconds Metrics to system.events

Add QueryTimeMicroseconds, SelectQueryTimeMicroseconds and InsertQueryTimeMicroseconds to system.events. #13336 (ianton-ru).
Added new timing metrics QueryTimeMicroseconds, SelectQueryTimeMicroseconds, and InsertQueryTimeMicroseconds to the system.events table in ClickHouse.

Why it matters

These new metrics provide more granular and precise measurement of query execution times in microseconds. This enhancement allows users to better monitor and analyze the performance of general queries, SELECT queries, and INSERT queries separately, helping to identify bottlenecks and optimize workload execution.

How to use it

Users can query the new columns QueryTimeMicroseconds, SelectQueryTimeMicroseconds, and InsertQueryTimeMicroseconds directly from the system.events table to retrieve detailed timing information for their queries. No additional configuration is required to enable these metrics.