fix (clickhouse): ReplacingMergeTree for sessions table
This commit is contained in:
parent
0cc5f37b0a
commit
0203ed8ea1
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ CREATE TABLE sessions (
|
||||||
pages_count UInt16,
|
pages_count UInt16,
|
||||||
events_count UInt16,
|
events_count UInt16,
|
||||||
errors_count UInt16
|
errors_count UInt16
|
||||||
) ENGINE = MergeTree
|
) ENGINE = ReplacingMergeTree( duration )
|
||||||
PARTITION BY toDate(datetime)
|
PARTITION BY toDate(datetime)
|
||||||
ORDER BY (project_id, datetime)
|
ORDER BY (project_id, datetime, session_id)
|
||||||
TTL datetime + INTERVAL 1 MONTH;
|
TTL datetime + INTERVAL 1 MONTH;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue