altinity-expert-clickhouse-index-analysis

Analyze ClickHouse index usage against query patterns to reduce data scanned.

16|2|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/Altinity/Skills --skill altinity-expert-clickhouse-index-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: altinity-expert-clickhouse-index-analysis
Source: https://github.com/Altinity/Skills/tree/main/altinity-expert-clickhouse/skills/altinity-expert-clickhouse-index-analysis
Command: npx skills add https://github.com/Altinity/Skills --skill altinity-expert-clickhouse-index-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes how ClickHouse indexes (PRIMARY KEY, ORDER BY, skipping indices, projections) are used in real workloads and identifies misalignments between query patterns and index design to reduce data scanned and improve performance.

Core Features & Use Cases

  • Inspect PRIMARY KEY, ORDER BY, skip indices, and projections to guide index redesigns.
  • Compare current index usage against actual query patterns to surface inefficiencies.
  • Use in performance tuning to understand why queries read excessive data and how to align indexes with common filters.

Quick Start

Analyze a representative workload to reveal under- and over-utilized indexes and suggest concrete improvements.

Frequently Asked Questions about altinity-expert-clickhouse-index-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize ClickHouse index usage for slow queries?

Optimize ClickHouse index usage by analyzing current PRIMARY KEY, ORDER BY, skipping indices, and projections against real query patterns to identify misalignments and reduce data scanned.

Why does my ClickHouse query read excessive data despite having a primary key?

Your ClickHouse query reads excessive data when index structures like PRIMARY KEY or ORDER BY are misaligned with common filters and access patterns, requiring analysis to realign indexes with typical workloads.

How do I analyze ClickHouse ORDER BY and data skipping index utilization for a workload?

Analyze ClickHouse ORDER BY and data skipping index utilization by comparing current index usage against observed query patterns to surface under- and over-utilized indexes and suggest concrete improvements.

Can I use projections in ClickHouse to improve selective query performance?

Yes, you can use projections in ClickHouse to improve selective query performance by aligning projection structures with common filters and time-range filtering to reduce data scanned.

What's the best way to redesign ClickHouse indexes for time-range filtering workloads?

The best way to redesign ClickHouse indexes for time-range filtering is to inspect existing PRIMARY KEY, skip indices, and projections, then compare against actual query patterns to guide concrete index redesigns.

When should I not use data skipping indices in ClickHouse?

You should avoid using data skipping indices in ClickHouse when analysis reveals they are over-utilized or misaligned with your actual query patterns, as this indicates ineffective index design for your workload.