Create a MergeTree table with a TTL clause on a Date or DateTime column for row-level expiry: TTL event_date + INTERVAL 90 DAY DELETE
Add a tiering rule to move older data to a cold volume before final deletion: TTL event_date + INTERVAL 30 DAY TO VOLUME 'cold', event_date + INTERVAL 90 DAY DELETE
Define storage volumes and policies in config.xml or via a storage_policy setting on the table, referencing named disks for hot and cold tiers
Force TTL processing on demand with: OPTIMIZE TABLE my_table FINAL — by default TTL fires during background MergeTree merges
Check TTL settings on an existing table: SHOW CREATE TABLE my_table and look for the TTL clause
Monitor when TTL will fire by inspecting the part-level TTL metadata: SELECT name, min_time, max_time, move_ttl_info FROM system.parts WHERE table = 'my_table'
Known gotchas
TTL deletion fires during background merges and is not instantaneous — data may remain queryable briefly after its TTL has passed; use OPTIMIZE TABLE FINAL only in maintenance windows as it is resource-intensive
The TTL expression must depend on a Date or DateTime column in the table schema; you cannot use non-deterministic functions like now() directly in the TTL definition
Column-level TTL (replacing expired column values with defaults) and table-level TTL (deleting rows) can coexist but have independent triggers — test both in staging to avoid unexpected data loss
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp