Configuring Data Retention
Control trace data retention in LangDB with scalable, cost-effective strategies using ClickHouse background TTL processes and tiered materialized views.
Overview
Tracing Data Architecture
Implementation using Materialized Views
Tier-Specific Materialized Views
CREATE MATERIALIZED VIEW langdb.traces_professional_mv
TO langdb.traces_professional
AS SELECT *
FROM langdb.traces;
CREATE TABLE langdb.traces_professional (
/* Same structure as base table */
) ENGINE = MergeTree()
ORDER BY (timestamp, user_id)
TTL timestamp + toIntervalDay(30);Data Access Flow
Benefits of This Approach
Backup and Disaster Recovery
Monitoring and Management
Future Enhancements
Last updated
Was this helpful?