cn ck 设置query_log表ttl为30天

This commit is contained in:
houjinchuan
2023-01-12 13:45:04 +08:00
parent 2519aebec0
commit 3e6973a6e6
2 changed files with 3 additions and 1 deletions

View File

@@ -394,4 +394,4 @@ ALTER table cyber_narrator_galaxy.metric_link on cluster ck_cluster add column I
ALTER table cyber_narrator_galaxy.metric_link on cluster ck_query add column IF NOT EXISTS server_zone String after server_region;
alter table system.query_log on cluster ck_cluster modify TTL event_date + INTERVAL 30 DAY;

View File

@@ -1689,3 +1689,5 @@ CREATE TABLE IF NOT EXISTS cyber_narrator_galaxy.metric_dns_rr_cname ON CLUSTER
external_query_num Int64,
avg_response_latency_ms Nullable(Float64)
) ENGINE = Distributed('ck_cluster', 'cyber_narrator_galaxy', 'metric_dns_rr_cname_local', rand());
alter table system.query_log on cluster ck_cluster modify TTL event_date + INTERVAL 30 DAY;