clickhouse

Provides ClickHouse schema, query, and ingestion optimization guidance.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/duyet/skills --skill clickhouse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clickhouse
Source: https://github.com/duyet/skills/tree/main/clickhouse
Command: npx skills add https://github.com/duyet/skills --skill clickhouse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides expert guidance to optimize ClickHouse schemas, queries, and data ingestion strategies, ensuring maximum performance and stability.

Core Features & Use Cases

  • Schema Design: Best practices for table engines, data types, partitioning, and primary keys.
  • Query Optimization: Techniques for efficient JOINs, aggregations, and index usage.
  • Data Ingestion: Strategies for batching, mutations, and asynchronous inserts.
  • Use Case: Review a complex CREATE TABLE statement to ensure optimal ORDER BY and partitioning, or analyze a slow-running query to identify bottlenecks and suggest index improvements.

Quick Start

Use the clickhouse skill to review the provided CREATE TABLE statement for best practices.

Frequently Asked Questions about clickhouse

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

FAQPage Schema
How do I optimize ClickHouse schema design for large datasets?

Optimize ClickHouse schema design by selecting appropriate table engines, data types, partitioning, and primary keys. This ensures maximum query performance and storage efficiency by aligning data layout with access patterns.

What is the best way to tune slow ClickHouse queries?

Tune slow ClickHouse queries by optimizing JOINs, aggregations, and index usage. Analyzing the query execution plan helps identify bottlenecks and suggests targeted index improvements for faster data retrieval.

How do I improve ClickHouse data ingestion performance?

Improve ClickHouse data ingestion performance through batching, mutations, and asynchronous inserts. These strategies optimize insert pipelines and maintain database stability during high-volume data writes.

How does partitioning affect ClickHouse query optimization?

Partitioning affects ClickHouse query optimization by limiting the data scanned during execution. Effective partitioning combined with an optimal ORDER BY key accelerates aggregations and improves overall query speed.

When should I use materialized views in ClickHouse?

Use materialized views in ClickHouse to pre-compute and store aggregated query results. This technique significantly speeds up read performance for frequent, complex queries by processing data at insertion time.

Why is my ClickHouse JOIN operation causing performance bottlenecks?

ClickHouse JOIN operations cause performance bottlenecks when joining large, unoptimized tables. Applying JOIN optimization techniques and ensuring proper primary key alignment resolves memory overhead and execution delays.