원클릭으로
storage-optimization
// Compression codecs, TTL policies, tiered storage, part management, and disk space optimization.
// Compression codecs, TTL policies, tiered storage, part management, and disk space optimization.
Exact column names for the system tables the agent queries most (processes, query_log, parts, merges, mutations, replicas, replication_queue, disks, settings, zookeeper, users/grants, metrics) plus rules for choosing dedicated tools over raw SQL. Load before hand-writing SQL against system tables.
Cluster management: distributed tables, ON CLUSTER DDL, node lifecycle, resharding, load balancing, and Keeper migration.
Schema migrations: ALTER patterns, engine changes, zero-downtime swaps, clickhouse-local offline migrations, and lightweight UPDATE/DELETE strategies.
ReplicatedMergeTree operations, failover procedures, lag diagnosis, quorum writes, and Keeper management.
RBAC configuration, row policies, quotas, network security, audit logging, and access control best practices.
Production operational practices: insert batching, async writes, query cache, connection pooling, and recommended settings.
| name | storage-optimization |
| description | Compression codecs, TTL policies, tiered storage, part management, and disk space optimization. |
ZSTD(level) — better compression, slower. Level 1-22 (3 is good default)Delta + ZSTD — excellent for time-series monotonic dataDoubleDelta — best for timestamps and countersGorilla — optimized for floating-point gauge metricsT64 — for integer columns with small rangeALTER TABLE t MODIFY COLUMN col TYPE UInt32 CODEC(Delta, ZSTD(3))ALTER TABLE t MODIFY COLUMN col CODEC(Delta, ZSTD(3))ALTER TABLE t MODIFY TTL event_time + INTERVAL 90 DAYALTER TABLE t MODIFY COLUMN old_col TTL event_time + INTERVAL 30 DAYTTL event_time + INTERVAL 7 DAY TO VOLUME 'cold'TTL event_time + INTERVAL 365 DAY DELETEsystem.merges WHERE is_ttl_merge = 1<storage_configuration> in config.xmlTTL event_time + INTERVAL 7 DAY TO DISK 'hdd'system.diskssystem.storage_policiesSELECT count() FROM system.parts WHERE active AND database = 'db' AND table = 't'system.detached_parts, clean with DROP DETACHED PARTDROP PARTITION for bulk deletion by timeTRUNCATE TABLE for full table cleanuptroubleshooting skill for disk-full recovery procedures.