원클릭으로
query-analyzer
Skill for analyzing and optimizing ClickHouse queries in go-ch-manager.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Skill for analyzing and optimizing ClickHouse queries in go-ch-manager.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | query-analyzer |
| description | Skill for analyzing and optimizing ClickHouse queries in go-ch-manager. |
This skill provides a structured workflow for analyzing and optimizing ClickHouse queries. When a user provides a query for analysis, follow these steps:
Review the table definition to understand the physical data layout.
SHOW CREATE TABLE {table} or DESCRIBE TABLE {table}.WHERE/PREWHERE?LowCardinality strings or Nullable columns that could be optimized?Use ClickHouse's built-in EXPLAIN to see how the engine intends to execute the query.
EXPLAIN indexes=1 {query}: Check if any marks/parts are being skipped by indexes.EXPLAIN actions=1 {query}: See the detailed execution steps.EXPLAIN PIPELINE {query}: Check the level of parallelism.If the query has been run, analyze its actual resource consumption.
system.query_log.read_rows vs result_rows: High ratio indicates inefficient filtering.read_bytes: Total I/O overhead.memory_usage: Peak memory consumed (crucial for large JOINs or Aggregations).query_duration_ms: Total latency.Apply these patterns to improve performance:
PREWHERE to prune data before reading large columns.JOINs where the right-side table fits in memory. Consider using Dictionaries for high-performance lookups.WHERE clause (e.g., use date >= '2023-01-01' instead of toYear(date) = 2023).When providing your analysis, structure it as follows:
EXPLAIN.