ClickHouse/tests/queries/0_stateless/02864_statistic_operate.reference
2023-10-04 00:58:26 +02:00

32 lines
1.2 KiB
Plaintext

CREATE TABLE default.t1\n(\n `a` Float64 STATISTIC(tdigest),\n `b` Int64 STATISTIC(tdigest),\n `pk` String\n)\nENGINE = MergeTree\nORDER BY pk\nSETTINGS min_bytes_for_wide_part = 0, index_granularity = 8192
After insert
SELECT count()
FROM t1
PREWHERE (a < 10) AND (b < 10)
10
0
After drop statistic
SELECT count()
FROM t1
PREWHERE (b < 10) AND (a < 10)
10
CREATE TABLE default.t1\n(\n `a` Float64,\n `b` Int64,\n `pk` String\n)\nENGINE = MergeTree\nORDER BY pk\nSETTINGS min_bytes_for_wide_part = 0, index_granularity = 8192
After add statistic
CREATE TABLE default.t1\n(\n `a` Float64 STATISTIC(tdigest),\n `b` Int64 STATISTIC(tdigest),\n `pk` String\n)\nENGINE = MergeTree\nORDER BY pk\nSETTINGS min_bytes_for_wide_part = 0, index_granularity = 8192
After materialize statistic
SELECT count()
FROM t1
PREWHERE (a < 10) AND (b < 10)
20
After merge
SELECT count()
FROM t1
PREWHERE (a < 10) AND (b < 10)
20
CREATE TABLE default.t1\n(\n `a` Float64 STATISTIC(tdigest),\n `c` Int64 STATISTIC(tdigest),\n `pk` String\n)\nENGINE = MergeTree\nORDER BY pk\nSETTINGS min_bytes_for_wide_part = 0, index_granularity = 8192
After rename
SELECT count()
FROM t1
PREWHERE (a < 10) AND (c < 10)
20