query-tuning-advisor

Official

Fix slow ClickHouse queries with proven rewrites.

Authorchmonitor
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: query-tuning-advisor
Download link: https://github.com/chmonitor/chmonitor/archive/main.zip#query-tuning-advisor

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.