This commit is contained in:
alesapin 2020-12-16 13:23:11 +03:00
parent 54aeb8fcff
commit dbbe761fa1
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
1 32
2 0
CREATE TABLE default.table_with_column_ttl\n(\n `EventTime` DateTime,\n `UserID` UInt64,\n `Age` UInt8\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS index_granularity = 8192
CREATE TABLE default.table_with_column_ttl\n(\n `EventTime` DateTime,\n `UserID` UInt64,\n `Age` UInt8\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS min_bytes_for_wide_part = 0, index_granularity = 8192
1 32
2 0
3 27

View File

@ -6,7 +6,8 @@ CREATE TABLE table_with_column_ttl
Age UInt8 TTL EventTime + INTERVAL 3 MONTH
)
ENGINE MergeTree()
ORDER BY tuple();
ORDER BY tuple()
SETTINGS min_bytes_for_wide_part = 0; -- column TTL doesn't work for compact parts
INSERT INTO table_with_column_ttl VALUES (now(), 1, 32);