Runbooks
Runbooks
Six pages of copy-paste SQL for the questions that come up while running ClickHouse — disk, parts, merges, queries, errors, replication, users, client tricks. Each question has its own anchor.
- RunbookRunbook: client output, formats and SQL tricksSmall things you look up under pressure: vertical output, saving results while watching them, inline data with format(), sampling, exact row counts, multi-column filters, latest row per key, constants in a view and a memory-hungry test query.
- RunbookRunbook: parts, merges and mutationsOn-call queries for MergeTree housekeeping: part counts, who creates parts, insert rate, running merges, OPTIMIZE, detached parts, mutations and lightweight DELETE.
- RunbookRunbook: queries, errors and resource useOn-call queries over query_log and system.errors: costly and failing query shapes, regressions after a change, error codes, CPU history, client timeouts, EXPLAIN indexes and low-memory JOINs.
- RunbookRunbook: replication, cluster operations and Kafka ingestionOn-call queries for replicated clusters: replica health, orphan tables, replication-queue oddities, ON CLUSTER drops, setting drift, BACKUP progress, live config reload, remote() and Kafka consumers.
- RunbookRunbook: storage and disk usageOn-call queries for disk pressure: size per table and column, per-disk placement, ROLLUP totals, column cardinality and TTL that deletes only matching rows.
- RunbookRunbook: users, settings and securityEdit a settings profile without wiping it, check a setting's stability tier, GRANT and REVOKE, lock down url() and remote() hosts, and understand the INSERT-to-webhook trick.