mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Backport #70452 to 24.8: Don't prefetch parts with no rows
This commit is contained in:
parent
1d81ea9619
commit
c6112f052e
@ -174,7 +174,7 @@ MergeTreeSequentialSource::MergeTreeSequentialSource(
|
||||
/*avg_value_size_hints=*/ {},
|
||||
/*profile_callback=*/ {});
|
||||
|
||||
if (prefetch)
|
||||
if (prefetch && !data_part->isEmpty())
|
||||
reader->prefetchBeginOfRange(Priority{});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
-- Tags: no-fasttest
|
||||
|
||||
DROP TABLE IF EXISTS 03250_avoid_prefetch;
|
||||
CREATE table 03250_avoid_prefetch(id UInt64, string LowCardinality(String))
|
||||
ENGINE = MergeTree
|
||||
ORDER BY id
|
||||
SETTINGS enable_vertical_merge_algorithm = 1, vertical_merge_algorithm_min_rows_to_activate = 1, vertical_merge_remote_filesystem_prefetch = 1,
|
||||
vertical_merge_algorithm_min_bytes_to_activate = 1, vertical_merge_algorithm_min_columns_to_activate = 1,
|
||||
min_rows_for_wide_part = 1, min_bytes_for_wide_part = 1, remove_empty_parts = 0, storage_policy = 's3_no_cache';
|
||||
|
||||
INSERT INTO 03250_avoid_prefetch VALUES (1, 'test');
|
||||
ALTER TABLE 03250_avoid_prefetch DELETE WHERE id = 1;
|
||||
INSERT INTO 03250_avoid_prefetch VALUES (2, 'test');
|
||||
OPTIMIZE TABLE 03250_avoid_prefetch FINAL;
|
||||
|
Loading…
Reference in New Issue
Block a user