Clickhouse: сжимаем данные эффективно22.02.2023 18:16
create table test_table
(
rand_seq_Int64_raw Int64,
rand_seq_Int64_T64 Int64 CODEC(T64, LZ4),
rand_seq_Int64_Delta Int64 CODEC(Delta(8), LZ4),
rand_seq_Int64_DoubleDelta Int64 CODEC(DoubleDelta, LZ4),
rand_seq_Int64_Gorilla Int64 CODEC(Gorilla, LZ4),
rand_seq_Int32_raw Int32,
rand_seq_Int32_T64 Int32 CODEC(T64, LZ4),
rand_seq_Int32_Delta Int32 CODEC(Delta(8), LZ4),
rand_seq_Int32_DoubleDelta Int32 CODEC(DoubleDelta, LZ4),
rand_seq_Int32_Gorilla Int32 CODEC(Gorilla, LZ4),
rand_seq_DateTime_raw DateTime,
rand_seq_DateTime_T64 DateTime CODEC(T64, LZ4),
rand_seq_DateTime_Delta DateTime CODEC(Delta(8), LZ4),
rand_seq_DateTime_DoubleDelta DateTime CODEC(DoubleDelta, LZ4),
rand_seq_DateTime_Gorilla DateTime CODEC(Gorilla, LZ4),
const_seq_Int64_raw Int64,
const_seq_Int64_T64 Int64 CODEC(T64, LZ4),
const_seq_Int64_Delta Int64 CODEC(Delta(8), LZ4),
const_seq_Int64_DoubleDelta Int64 CODEC(DoubleDelta, LZ4),
const_seq_Int64_Gorilla Int64 CODEC(Gorilla, LZ4),
const_seq_Int32_raw Int32,
const_seq_Int32_T64 Int32 CODEC(T64, LZ4),
const_seq_Int32_Delta Int32 CODEC(Delta(8), LZ4),
const_seq_Int32_DoubleDelta Int32 CODEC(DoubleDelta, LZ4),
const_seq_Int32_Gorilla Int32 CODEC(Gorilla, LZ4),
const_seq_DateTime_raw DateTime,
const_seq_DateTime_T64 DateTime CODEC(T64, LZ4),
const_seq_DateTime_Delta DateTime CODEC(Delta(8), LZ4),
const_seq_DateTime_DoubleDelta DateTime CODEC(DoubleDelta, LZ4),
const_seq_DateTime_Gorilla DateTime CODEC(Gorilla, LZ4),
gauss_float_seq_Float64_raw Float64,
gauss_float_seq_Float64_Delta Float64 CODEC(Delta(8), LZ4),
gauss_float_seq_Float64_DoubleDelta Float64 CODEC(DoubleDelta, LZ4),
gauss_float_seq_Float64_Gorilla Float64 CODEC(Gorilla, LZ4),
gauss_float_seq_Float64_FPC Float64 CODEC(FPC, LZ4),
gauss_float_seq_Float32_raw Float32,
gauss_float_seq_Float32_Delta Float32 CODEC(Delta(8), LZ4),
gauss_float_seq_Float32_DoubleDelta Float32 CODEC(DoubleDelta, LZ4),
gauss_float_seq_Float32_Gorilla Float32 CODEC(Gorilla, LZ4),
gauss_float_seq_Float32_FPC Float32 CODEC(FPC, LZ4),
rand_float_seq_Float64_raw Float64,
rand_float_seq_Float64_Delta Float64 CODEC(Delta(8), LZ4),
rand_float_seq_Float64_DoubleDelta Float64 CODEC(DoubleDelta, LZ4),
rand_float_seq_Float64_Gorilla Float64 CODEC(Gorilla, LZ4),
rand_float_seq_Float64_FPC Float64 CODEC(FPC, LZ4),
rand_float_seq_Float32_raw Float32,
rand_float_seq_Float32_Delta Float32 CODEC(Delta(8), LZ4),
rand_float_seq_Float32_DoubleDelta Float32 CODEC(DoubleDelta, LZ4),
rand_float_seq_Float32_Gorilla Float32 CODEC(Gorilla, LZ4),
rand_float_seq_Float32_FPC Float32 CODEC(FPC, LZ4),
const_float_seq_Float64_raw Float64,
const_float_seq_Float64_Delta Float64 CODEC(Delta(8), LZ4),
const_float_seq_Float64_DoubleDelta Float64 CODEC(DoubleDelta, LZ4),
const_float_seq_Float64_Gorilla Float64 CODEC(Gorilla, LZ4),
const_float_seq_Float64_FPC Float64 CODEC(FPC, LZ4),
const_float_seq_Float32_raw Float32,
const_float_seq_Float32_Delta Float32 CODEC(Delta(8), LZ4),
const_float_seq_Float32_DoubleDelta Float32 CODEC(DoubleDelta, LZ4),
const_float_seq_Float32_Gorilla Float32 CODEC(Gorilla, LZ4),
const_float_seq_Float32_FPC Float32 CODEC(FPC, LZ4),
gauss_int_seq_Int64_raw Int64,
gauss_int_seq_Int64_T64 Int64 CODEC(T64, LZ4),
gauss_int_seq_Int64_Delta Int64 CODEC(Delta(8), LZ4),
gauss_int_seq_Int64_DoubleDelta Int64 CODEC(DoubleDelta, LZ4),
gauss_int_seq_Int64_Gorilla Int64 CODEC(Gorilla, LZ4),
gauss_int_seq_Int32_raw Int32,
gauss_int_seq_Int32_T64 Int32 CODEC(T64, LZ4),
gauss_int_seq_Int32_Delta Int32 CODEC(Delta(8), LZ4),
gauss_int_seq_Int32_DoubleDelta Int32 CODEC(DoubleDelta, LZ4),
gauss_int_seq_Int32_Gorilla Int32 CODEC(Gorilla, LZ4),
dt DateTime default now()
)
engine = MergeTree ORDER BY dt;
© Habrahabr.ru