Updating test.

This commit is contained in:
Nikolai Kochetov 2024-11-15 17:57:26 +00:00
parent ee7b53646f
commit 4831414476
2 changed files with 14 additions and 3 deletions

View File

@ -1,2 +1,11 @@
1
2
Expression ((Project names + (Projection + Change column names to column identifiers)))
ReadFromMergeTree (default.tt)
Indexes:
PrimaryKey
Keys:
dateTrunc(\'hour\', ts)
Condition: and((dateTrunc(\'hour\', ts) in (-Inf, 1731592800]), (dateTrunc(\'hour\', ts) in [1731506400, +Inf)))
Parts: 1/1
Granules: 1/1

View File

@ -1,3 +1,4 @@
DROP TABLE IF EXISTS tt;
CREATE TABLE tt
(
`id` Int64,
@ -9,7 +10,8 @@ SETTINGS index_granularity = 8192;
INSERT INTO tt VALUES (1, '2024-11-14 00:00:00'), (2, '2024-11-14 00:00:00');
SELECT id
FROM tt
PREWHERE ts BETWEEN toDateTime(1731506400) AND toDateTime(1731594420);
SELECT id FROM tt PREWHERE ts BETWEEN toDateTime(1731506400) AND toDateTime(1731594420);
explain indexes=1 SELECT id FROM tt PREWHERE ts BETWEEN toDateTime(1731506400) AND toDateTime(1731594420);
DROP TABLE tt;