Codec for Strings

261 views
Skip to first unread message

Nitesh Chaudhary

unread,
Dec 1, 2020, 4:46:00 AM12/1/20
to ClickHouse
Hi,
I am creating a table with most columns have datatype of String.
For other datatype like int64, float64 i have fairly good idea which codec to use.
Not sure about codec to be used for strings.
Can you suggest
My table structure is :
CREATE table traffic(
A string,      (fixed size string and take 2-4 different value like '15_minute', '30_minute')
B string,       (This also has max cardinality of 100 with values like 'AA_2334_1')
C string,      (This also has max cardinality of 100 with values like 'AA-22-AA')
D string       (cardinality range from 1K-50K with value like '1223_ssda_2223_ssssd')
E Array(string)
ENGINE = ReplicatedReplacingMergeTree()
ORDER BY A, B, C,D

Denis Zhuravlev

unread,
Dec 1, 2020, 9:34:29 AM12/1/20
to ClickHouse
I would use

... LowCardinality(String) CODEC(ZSTD)

for all 4 cases
Reply all
Reply to author
Forward
0 new messages