2021-01-04 04:40:48 +00:00
|
|
|
drop table if exists p;
|
|
|
|
|
|
|
|
create table p(d Date, i int, j int) engine MergeTree partition by d order by i settings max_partitions_to_read = 1;
|
|
|
|
|
2021-01-06 09:18:48 +00:00
|
|
|
insert into p values ('2021-01-01', 1, 2), ('2021-01-02', 4, 5);
|
2021-01-04 04:40:48 +00:00
|
|
|
|
2024-05-30 12:27:25 +00:00
|
|
|
select * from p order by i; -- { serverError TOO_MANY_PARTITIONS }
|
2021-01-04 04:40:48 +00:00
|
|
|
|
2021-01-06 09:18:48 +00:00
|
|
|
select * from p order by i settings max_partitions_to_read = 2;
|
2021-01-04 04:40:48 +00:00
|
|
|
|
2021-01-06 09:18:48 +00:00
|
|
|
select * from p order by i settings max_partitions_to_read = 0; -- unlimited
|
2021-01-04 04:40:48 +00:00
|
|
|
|
|
|
|
alter table p modify setting max_partitions_to_read = 2;
|
|
|
|
|
2021-01-06 09:18:48 +00:00
|
|
|
select * from p order by i;
|
2021-01-04 04:40:48 +00:00
|
|
|
|
|
|
|
drop table if exists p;
|