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.
Diagnose a column/table schema issue — Nullable overhead, oversized integer, or weak compression — and propose an ALTER.
Strict rules on outputting ClickHouse syntax, limiting rows, and rendering SQL in markdown.
Diagnose server-state issues using running queries, slow-query history, and server info.