v.21.1New Features
Add Database Information and Fields to System Query Log
Add information about used databases, tables and columns in system.query_log. Addquery_kindandnormalized_query_hashfields. #17726 (Amos Bird).
Why it matters
This feature improves query diagnostics and auditing by providing detailed insights into the exact databases, tables, and columns accessed by each query. The inclusion ofquery_kind helps categorize queries, while normalized_query_hash allows efficient grouping of similar queries despite minor differences. This aids in performance analysis, troubleshooting, and query monitoring.How to use it
Users can access the extended query details by querying thesystem.query_log table as usual. The new fields query_kind and normalized_query_hash are available alongside existing columns, requiring no special configuration to start collecting this enriched metadata.