altinity-expert-clickhouse-schema

Analyze MergeTree table schemas for partitioning and design anti-patterns.

42|7|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/ntk148v/clicklens --skill altinity-expert-clickhouse-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: altinity-expert-clickhouse-schema
Source: https://github.com/ntk148v/clicklens/tree/main/.agent/skills/altinity-expert-clickhouse-schema
Command: npx skills add https://github.com/ntk148v/clicklens --skill altinity-expert-clickhouse-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze ClickHouse table schemas to detect partitioning and design anti-patterns. This helps data teams optimize performance, reduce maintenance burden, and surface schema inefficiencies early.

Core Features & Use Cases

  • Partition health audits to detect overly granular partitions and suggest reorganization for better performance and easier maintenance.
  • Primary key and ORDER BY analysis to optimize data locality, compression, and query patterns.
  • Materialized View (MV) design checks to ensure maintainable and efficient MV pipelines, including dependency clarity.
  • Diagnostic queries and guidance to surface schema inefficiencies and actionable optimization recommendations.

Quick Start

Run the altinity-expert-clickhouse-schema audits against your MergeTree tables to surface design issues and optimization opportunities.

Frequently Asked Questions about altinity-expert-clickhouse-schema

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

FAQPage Schema
How do I diagnose ClickHouse schema design anti-patterns for optimal performance?

You diagnose ClickHouse schema anti-patterns by analyzing MergeTree table definitions to detect partitioning, primary key, and materialized view design flaws. This surfaces schema inefficiencies early to optimize query performance and reduce maintenance burden.

What causes overly granular partitioning in ClickHouse MergeTree tables?

Overly granular partitioning in ClickHouse MergeTree tables happens when partition keys generate excessive small partitions. A partition health audit detects these anti-patterns and suggests reorganization for better performance and easier maintenance.

How do I optimize primary key and ORDER BY usage in ClickHouse?

You optimize ClickHouse primary key and ORDER BY usage by analyzing table schemas to improve data locality, compression, and query patterns. This analysis identifies inefficient key structures and provides actionable optimization recommendations.

Can I audit materialized view design and dependencies in ClickHouse?

Yes, you can audit materialized view design in ClickHouse by running schema checks that evaluate MV pipelines for maintainability and efficiency. This analysis ensures dependency clarity and identifies design flaws in materialized views.

What are common ClickHouse schema issues like nullable columns and long names?

Common ClickHouse schema issues include nullable columns, long names, and excessive column counts. Schema analysis enforces checks for these design problems, alongside compression issues, to surface inefficiencies and recommend optimal settings.