Skip to content

Commit

Permalink
added tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Oct 31, 2023
1 parent 3d8dba6 commit 8a6fe9d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions sql/20231031110543_update_event.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
ALTER TABLE events
ENGINE = MergeTree()
ORDER BY (ClusterName, EventTime)
TTL EventTime + INTERVAL 30 DAY
SETTINGS index_granularity = 8192;
-- Change the engine to MergeTree
ALTER TABLE events ENGINE = MergeTree();

-- Specify the new ORDER BY clause
ALTER TABLE events ORDER BY ClusterName, EventTime;

-- Set a TTL policy on the EventTime column
ALTER TABLE events TTL EventTime + INTERVAL 30 DAY;

-- Adjust the index granularity
ALTER TABLE events SETTINGS index_granularity = 8192;

0 comments on commit 8a6fe9d

Please sign in to comment.