Query Profiler CPU Bottleneck
warningCPU-intensive query operations (complex aggregations, string parsing, decompression) saturate CPU resources, causing query queuing and increased latency. This is identifiable through high UserTimeMicroseconds in query profiles.
Monitor CPU time per query via ProfileEvents['UserTimeMicroseconds'] and ProfileEvents['SystemTimeMicroseconds'] in system.query_log. Track system-wide CPU wait. Alert when queries consistently consume >10s CPU time or when CPU wait increases.
Use EXPLAIN PIPELINE to identify CPU-intensive pipeline stages. Enable query profiling and analyze flamegraphs via system.trace_log to find hot functions. Optimize with pre-aggregated materialized views, simpler expressions, or better codecs. Scale CPU resources if workload is inherently CPU-bound.