ClickHouse/tests/queries/0_stateless/02932_set_ttl_where.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
484 B
MySQL
Raw Normal View History

2024-01-13 20:09:10 +00:00
-- Tags: no-ordinary-database
2023-12-01 17:45:23 +00:00
create or replace table t_temp (
a UInt32,
timestamp DateTime
)
engine = MergeTree
order by a
2023-12-05 14:20:07 +00:00
TTL timestamp + INTERVAL 2 SECOND WHERE a in (select number from system.numbers limit 100_000);
2023-12-01 17:45:23 +00:00
select sleep(1);
insert into t_temp select rand(), now() from system.numbers limit 1_000_000;
select sleep(1);
insert into t_temp select rand(), now() from system.numbers limit 1_000_000;
select sleep(1);
optimize table t_temp final;
2024-01-13 20:09:10 +00:00
DROP TABLE t_temp;