What problem does it solve?
This Skill eliminates guesswork when troubleshooting slow, resource-heavy ClickHouse queries that degrade application performance and waste cluster resources, replacing random optimization attempts with evidence-based diagnosis.
Core Features & Use Cases
- Evidence-Based Diagnosis: Uses EXPLAIN INDEXES, EXPLAIN PLAN, and system.query_log metrics to identify root causes like full scans, missing predicate pushdown, and inefficient JOINs.
- Concrete Rewrites: Provides actionable before/after SQL changes including PREWHERE optimization, JOIN algorithm and order fixes, skip index recommendations, and aggregation tuning.
- Real-World Use Case: A user with a 45-second query reading 2 billion rows receives a tuned version that runs in seconds with 10x lower memory usage by applying PREWHERE, removing unnecessary JOINs, and switching to approximate aggregation functions.
Quick Start
Use the query-tuning-advisor skill to optimize the slow ClickHouse query you are currently debugging that is reading excessive rows and using too much memory.