clickhouse-io

Implements ClickHouse table design, query optimization, and analytics patterns for OLAP workloads.

2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/adamreger/ecc-antigravity --skill clickhouse-io-adamreger
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clickhouse-io
Source: https://github.com/adamreger/ecc-antigravity/tree/main/skills/clickhouse-io
Command: npx skills add https://github.com/adamreger/ecc-antigravity --skill clickhouse-io-adamreger

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing efficient ClickHouse schemas and writing performant analytical queries requires deep knowledge of MergeTree engines, partitioning, and aggregation functions that most developers lack when migrating from row-oriented databases. ## Core Features & Use Cases - Table Design Patterns: Guidance on MergeTree, ReplacingMergeTree, and AggregatingMergeTree engines with partitioning and ordering key strategies. - Query Optimization: Patterns for efficient filtering, aggregations with quantile functions, window functions, and materialized views for real-time rollups. - Data Ingestion & Pipelines: Batch insert patterns in TypeScript, streaming inserts, ETL workflows, and change data capture from PostgreSQL. - Use Case: When migrating analytics from PostgreSQL to ClickHouse, use this Skill to design a partitioned MergeTree table, build materialized views for hourly stats, and write funnel or cohort analysis queries. ## Quick Start Ask the AI to design a ClickHouse table schema and optimized aggregation query for your time-series analytics dataset.

Frequently Asked Questions about clickhouse-io

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

FAQPage Schema
How do I design a ClickHouse table for analytics?▼

Use the MergeTree engine with a time-based partition key like toYYYYMM(date) and an ORDER BY clause placing your most frequently filtered columns first. Choose the smallest appropriate data types and LowCardinality for repeated strings.

How to optimize slow ClickHouse queries?▼

Filter on indexed columns first, avoid SELECT *, and use ClickHouse-specific functions like quantile instead of percentile. Check system.query_log for queries exceeding duration thresholds and review partition pruning behavior.

What is the difference between MergeTree and ReplacingMergeTree?▼

ReplacingMergeTree deduplicates rows with the same sorting key during background merges, making it suitable for data arriving from multiple sources. Standard MergeTree keeps all inserted rows and is the default choice for append-only analytics.

Can I migrate analytics from PostgreSQL to ClickHouse?▼

Yes, use an ETL pattern that extracts rows from PostgreSQL, transforms them into columnar-friendly structures, and batch inserts into ClickHouse. For ongoing sync, listen to PostgreSQL notifications and stream changes as CDC events.

Why are individual inserts slow in ClickHouse?▼

ClickHouse is optimized for bulk writes, and each small insert creates a separate data part requiring expensive background merges. Batch rows into a single INSERT statement or use streaming inserts for continuous ingestion.