Clickhouse Query Optimization

🌐Community
by obsessiondb · vlatest · Repository

Helps with querying, optimization as part of working with databases and data persistence workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add obsessiondb-clickhouse-query-optimization npx -- -y @trustedskills/obsessiondb-clickhouse-query-optimization
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "obsessiondb-clickhouse-query-optimization": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/obsessiondb-clickhouse-query-optimization"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill optimizes ClickHouse queries to improve performance and efficiency. It analyzes query plans, identifies bottlenecks like full table scans or inefficient joins, and suggests modifications such as adding indexes or rewriting the query logic. The goal is to reduce execution time and resource consumption for ClickHouse workloads.

When to use it

  • Slow Queries: When you have ClickHouse queries that are consistently taking a long time to execute.
  • Resource Contention: If your ClickHouse cluster is experiencing high CPU or memory usage due to inefficient queries.
  • Complex Joins: For queries involving multiple tables and complex join conditions, where optimization can significantly impact performance.
  • Large Datasets: When querying very large datasets in ClickHouse, query optimization becomes crucial for acceptable response times.

Key capabilities

  • Query plan analysis
  • Bottleneck identification (full table scans, inefficient joins)
  • Index suggestion
  • Query rewriting recommendations

Example prompts

  • "Optimize this ClickHouse query: SELECT ... FROM ... WHERE ..."
  • "Analyze the performance of this ClickHouse query and suggest improvements."
  • "I'm seeing slow execution times for queries joining tables X and Y. Can you help?"

Tips & gotchas

This skill requires access to the ClickHouse query being analyzed. Ensure the AI agent has appropriate permissions and context to effectively evaluate and recommend optimizations.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
obsessiondb
Installs
4

🌐 Community

Passed automated security scans.