Skip to content

Commit

Permalink
fix: add ttl to tables
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Aug 22, 2024
1 parent 4904ddb commit 8663a7d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CREATE TABLE IF NOT EXISTS signoz_logs.logs_v2_resource ON CLUSTER {{.SIGNOZ_CL
ENGINE = {{.SIGNOZ_REPLICATED}}ReplacingMergeTree
PARTITION BY toDate(seen_at_ts_bucket_start / 1000)
ORDER BY (labels, fingerprint, seen_at_ts_bucket_start)
TTL toDateTime(seen_at_ts_bucket_start) + INTERVAL 1296000 SECOND + INTERVAL 1800 SECOND DELETE
SETTINGS ttl_only_drop_parts = 1, index_granularity = 8192;


Expand Down Expand Up @@ -55,7 +56,8 @@ CREATE TABLE IF NOT EXISTS signoz_logs.logs_v2 ON CLUSTER {{.SIGNOZ_CLUSTER}}
ENGINE = {{.SIGNOZ_REPLICATED}}MergeTree
PARTITION BY toDate(timestamp / 1000000000)
ORDER BY (ts_bucket_start, resource_fingerprint, severity_text, timestamp, id)
SETTINGS index_granularity = 8192;
TTL toDateTime(timestamp / 1000000000) + INTERVAL 1296000 SECOND DELETE
SETTINGS ttl_only_drop_parts = 1, index_granularity = 8192;



Expand Down

0 comments on commit 8663a7d

Please sign in to comment.