diff --git a/sql/20230915101223_events.up.sql b/sql/20230915101223_events.up.sql index b857a489..447b0b39 100644 --- a/sql/20230915101223_events.up.sql +++ b/sql/20230915101223_events.up.sql @@ -12,4 +12,7 @@ CREATE TABLE IF NOT EXISTS events ( Event String, FirstTime String, LastTime String -) engine=File(TabSeparated); +) ENGINE = MergeTree() + ORDER BY (ClusterName, EventTime) + TTL EventTime + INTERVAL 30 DAY + SETTINGS index_granularity = 8192;