optimize-model

Analyze ClickHouse transformation model queries and recommend performance improvements.

1|Updated Aug 19, 2025
One-click install
npx skills add https://github.com/ethpandaops/xatu-cbt --skill optimize-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-model
Source: https://github.com/ethpandaops/xatu-cbt/tree/main/.claude/skills/optimize-model
Command: npx skills add https://github.com/ethpandaops/xatu-cbt --skill optimize-model

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill identifies and recommends high-impact performance improvements for ClickHouse transformation models, ensuring queries run faster and more efficiently without manual code edits.

Core Features & Use Cases

  • Performance Analysis: Deeply analyzes transformation model queries using live ClickHouse evidence.
  • Dependency Rendering: Visualizes and understands model dependencies.
  • Schema Introspection: Examines table schemas for optimization opportunities.
  • Benchmarking: Runs performance tests across different time windows to validate improvements.
  • Recommendations: Provides actionable, evidence-based suggestions for query optimization.
  • Use Case: A data engineer has a complex transformation model that is running slowly. They use this Skill to pinpoint the exact bottlenecks, receive specific optimization recommendations (e.g., rewriting a join, adjusting data types), and see benchmark results proving the improvement.

Quick Start

Use the optimize-model skill to analyze the performance of the 'models/transformations/fct_block.sql' model.

Frequently Asked Questions about optimize-model

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

FAQPage Schema
How do I optimize slow ClickHouse transformation model queries?

To optimize slow ClickHouse transformation model queries, you can analyze live performance metrics and schema introspection to identify bottlenecks. This approach provides actionable recommendations like rewriting joins or adjusting data types to improve SQL query efficiency.

What is ClickHouse schema introspection for query performance tuning?

ClickHouse schema introspection for query performance tuning is the process of examining table schemas to identify optimization opportunities. It analyzes data types and structures to recommend high-impact SQL improvements without requiring manual code edits.

How do I benchmark ClickHouse SQL query performance across different time windows?

To benchmark ClickHouse SQL query performance across different time windows, you run performance tests that validate improvements using live ClickHouse evidence. This benchmarking process measures execution times to prove the impact of applied query optimization recommendations.

Do I need Bash and Python to run ClickHouse query analysis?

Yes, you need Bash and Python to run ClickHouse query analysis, along with jq and HTTP access to ClickHouse. These dependencies are required to execute the scripts that analyze performance metrics and generate optimization recommendations.

What's the best way to visualize ClickHouse model dependencies for SQL optimization?

The best way to visualize ClickHouse model dependencies for SQL optimization is by using a tool that renders dependency graphs alongside schema analysis. This helps you understand transformation model structures to pinpoint performance bottlenecks accurately.

Why does my ClickHouse transformation model run slowly despite correct SQL syntax?

Your ClickHouse transformation model may run slowly due to suboptimal joins, inefficient data types, or poor schema design rather than syntax errors. Analyzing live performance metrics and schema introspection can pinpoint these exact bottlenecks for targeted query optimization.