This commit is contained in:
Alexey Milovidov 2021-07-18 18:32:34 +03:00
parent 2fedbfdf65
commit e26f66f51f

View File

@ -15,7 +15,7 @@ SELECT count() FROM test.hits WHERE EventDate IN (toDate('2014-03-18'), toDate('
SELECT count() FROM test.hits WHERE EventDate = concat('2014-0', '3-18'); SELECT count() FROM test.hits WHERE EventDate = concat('2014-0', '3-18');
DROP TABLE IF EXISTS test.hits_indexed_by_time; DROP TABLE IF EXISTS test.hits_indexed_by_time;
CREATE TABLE test.hits_indexed_by_time (EventDate Date, EventTime DateTime) ENGINE = MergeTree(EventDate, EventTime, 8192); CREATE TABLE test.hits_indexed_by_time (EventDate Date, EventTime DateTime('Europe/Moscow')) ENGINE = MergeTree(EventDate, EventTime, 8192);
INSERT INTO test.hits_indexed_by_time SELECT EventDate, EventTime FROM test.hits; INSERT INTO test.hits_indexed_by_time SELECT EventDate, EventTime FROM test.hits;
SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = '2014-03-18 01:02:03'; SELECT count() FROM test.hits_indexed_by_time WHERE EventTime = '2014-03-18 01:02:03';