From c653adab70df4c38ddd531f52cbc5342017b1472 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Thu, 16 Jan 2025 16:40:28 -0800 Subject: [PATCH] test --- clickhouse_db_schema/oss_ci_utilization/schema.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clickhouse_db_schema/oss_ci_utilization/schema.sql b/clickhouse_db_schema/oss_ci_utilization/schema.sql index 90ef6be36d..eb51feb7b6 100644 --- a/clickhouse_db_schema/oss_ci_utilization/schema.sql +++ b/clickhouse_db_schema/oss_ci_utilization/schema.sql @@ -28,6 +28,7 @@ CREATE TABLE misc.oss_ci_utilization_metadata ENGINE = SharedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}') PARTITION BY toYYYYMM(started_at) ORDER BY (workflow_id, job_id, started_at) +-- data exists in the db for a year. -- time to live is based on created_at which is when the record is inserted in db. TTL toDate(created_at) + toIntervalYear(1) SETTINGS index_granularity = 8192 @@ -57,6 +58,7 @@ ORDER BY type, time_stamp, ) +-- data exists in the db for a year. -- time to live is based on created_at which is when the record is inserted in db. TTL toDate(created_at) + toIntervalYear(1) SETTINGS index_granularity = 8192