원클릭으로
schema-diagnosis
Diagnose a column/table schema issue — Nullable overhead, oversized integer, or weak compression — and propose an ALTER.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Diagnose a column/table schema issue — Nullable overhead, oversized integer, or weak compression — and propose an ALTER.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Rules and strategies for exploring databases, tables, schemas, and searching metadata.
Complex rules for calling render_chart, inferring axes, and choosing chart types based on user intent.
Diagnose a ClickHouse server error (code/name/exception) and give a concrete, actionable fix.
Diagnose part/partition health of a MergeTree table — too many parts, slow/stuck merges, bad partition key.
Rules for using explain/analyze/optimize tools to help the user tune their queries.
Strict rules on outputting ClickHouse syntax, limiting rows, and rendering SQL in markdown.
| name | schema-diagnosis |
| description | Diagnose a column/table schema issue — Nullable overhead, oversized integer, or weak compression — and propose an ALTER. |
The user wants to know if a column/table is storing data wastefully and how to
fix it. Three common categories: nullable (a Nullable wrapper that's rarely
null), oversized (an integer wider than the data needs), compression (a
column compressing poorly / wrong codec). Ground every recommendation in real
numbers, then propose a concrete ALTER TABLE.
get_table_ddl — current column type, codec, engine.run_select_query, by category:
SELECT count() AS total, countIf(col IS NULL) AS nulls FROM db.table. If ~0, drop the wrapper.SELECT min(col) AS lo, max(col) AS hi FROM db.table SAMPLE 0.01. Pick the narrowest fitting Int/UInt.SELECT sum(data_compressed_bytes) AS comp, sum(data_uncompressed_bytes) AS uncomp FROM system.parts_columns WHERE database='db' AND table='t' AND column='col'. Ratio ≈ uncomp/comp.get_table_size — scale context for the rewrite cost.types-codecs-compression reference skill — integer sizing, LowCardinality, Nullable, codec selection (Delta/DoubleDelta/Gorilla/ZSTD).system-table-reference reference skill — exact system.columns / system.parts_columns columns.ALTER TABLE db.table MODIFY COLUMN … (drop Nullable / narrow the int / set CODEC), grounded in the numbers you measured.FORMAT clause. MODIFY COLUMN rewrites the column across all parts — note a human should validate on a sample first.