data-analysis

Run read-only SQL recipes against ClickHouse system tables for custom analysis.

255|42|Updated Nov 16, 2023
One-click install
npx skills add https://github.com/chmonitor/chmonitor --skill data-analysis-chmonitor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-analysis
Source: https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/data-analysis
Command: npx skills add https://github.com/chmonitor/chmonitor --skill data-analysis-chmonitor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fills gaps in ClickHouse cluster analysis when built-in dedicated tools (like get_slow_queries or get_expensive_queries) do not support the specific aggregations, custom time windows, or metric combinations you need for your use case.

Core Features & Use Cases

  • Custom Query Log Analysis: Run pre-vetted read-only SQL recipes to analyze system.query_log for largest data scans, most expensive queries, query fingerprint patterns, and query volume trends.
  • Table Storage Breakdown: Aggregate system.parts data to rank user tables by disk usage, row count, and compression ratio.
  • Period-over-Period Comparison: Compare query load between two equal-length time windows to spot traffic spikes or performance regressions.
  • Use Case: For example, if you need to identify the top 10 query patterns that consumed the most read bytes over a custom 7-day window, or compare query latency between this week and last week, this skill provides safe, version-aware SQL recipes to get those insights without risking data modification.

Quick Start

Use the data-analysis skill to run a custom read-only SQL query that identifies the top 5 query patterns with the highest average memory usage over a specified time window.

Frequently Asked Questions about data-analysis

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

FAQPage Schema
How do I analyze ClickHouse query logs when built-in tools don't support custom time windows?

Analyze ClickHouse query logs by running pre-vetted, read-only SQL recipes against system.query_log to calculate custom aggregations, rank expensive queries, and evaluate historical load trends over specific time windows.

What is the best way to identify the largest data scans in ClickHouse?

Identify the largest data scans in ClickHouse by executing custom SQL queries against system.query_log to rank read bytes and group query fingerprints, providing insights built-in dedicated tools cannot aggregate.

How do I check ClickHouse table storage breakdown by disk usage and compression ratio?

Check ClickHouse table storage breakdown by aggregating system.parts data with custom SQL, which ranks user tables by disk usage, row count, and compression ratio for detailed storage analysis.

Can I compare ClickHouse query load between two custom time periods?

Compare ClickHouse query load between two equal-length time windows using period-over-period SQL recipes to spot traffic spikes or performance regressions without risking data modification.

Does this custom SQL analysis approach modify my ClickHouse database?

Custom SQL analysis queries are strictly read-only and target ClickHouse system tables like query_log and parts, ensuring you can safely extract version-aware performance insights without modifying database data.