ClickHouse/dbms/tests/queries/0_stateless/00345_index_accurate_comparison.sql

21 lines
521 B
MySQL
Raw Normal View History

2016-07-09 00:20:44 +00:00
DROP TABLE IF EXISTS test.index;
CREATE TABLE test.index
(
key Int32,
name String,
merge_date Date
) ENGINE = MergeTree(merge_date, key, 8192);
insert into test.index values (1,'1','2016-07-07');
insert into test.index values (-1,'-1','2016-07-07');
select * from test.index where key = 1;
select * from test.index where key = -1;
OPTIMIZE TABLE test.index;
select * from test.index where key = 1;
select * from test.index where key = -1;
2017-05-24 20:10:19 +00:00
select * from test.index where key < -0.5;
2016-07-09 00:20:44 +00:00
DROP TABLE test.index;