mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #61511 from jewelzqiu/existing-count
Add docs for lwd-aware merge settings
This commit is contained in:
commit
6c4cd355e6
@ -867,3 +867,31 @@ Default value: `Never`
|
||||
Persists virtual column `_block_number` on merges.
|
||||
|
||||
Default value: false.
|
||||
|
||||
## exclude_deleted_rows_for_part_size_in_merge {#exclude_deleted_rows_for_part_size_in_merge}
|
||||
|
||||
If enabled, estimated actual size of data parts (i.e., excluding those rows that have been deleted through `DELETE FROM`) will be used when selecting parts to merge. Note that this behavior is only triggered for data parts affected by `DELETE FROM` executed after this setting is enabled.
|
||||
|
||||
Possible values:
|
||||
|
||||
- true, false
|
||||
|
||||
Default value: false
|
||||
|
||||
**See Also**
|
||||
|
||||
- [load_existing_rows_count_for_old_parts](#load_existing_rows_count_for_old_parts) setting
|
||||
|
||||
## load_existing_rows_count_for_old_parts {#load_existing_rows_count_for_old_parts}
|
||||
|
||||
If enabled along with [exclude_deleted_rows_for_part_size_in_merge](#exclude_deleted_rows_for_part_size_in_merge), deleted rows count for existing data parts will be calculated during table starting up. Note that it may slow down start up table loading.
|
||||
|
||||
Possible values:
|
||||
|
||||
- true, false
|
||||
|
||||
Default value: false
|
||||
|
||||
**See Also**
|
||||
|
||||
- [exclude_deleted_rows_for_part_size_in_merge](#exclude_deleted_rows_for_part_size_in_merge) setting
|
||||
|
@ -1352,8 +1352,9 @@ void IMergeTreeDataPart::loadExistingRowsCount()
|
||||
if (existing_rows_count.has_value())
|
||||
return;
|
||||
|
||||
if (!rows_count || !storage.getSettings()->load_existing_rows_count_for_old_parts || !supportLightweightDeleteMutate()
|
||||
|| !hasLightweightDelete())
|
||||
if (!rows_count || !supportLightweightDeleteMutate() || !hasLightweightDelete()
|
||||
|| !storage.getSettings()->exclude_deleted_rows_for_part_size_in_merge
|
||||
|| !storage.getSettings()->load_existing_rows_count_for_old_parts)
|
||||
existing_rows_count = rows_count;
|
||||
else
|
||||
existing_rows_count = readExistingRowsCount();
|
||||
|
@ -673,7 +673,8 @@ private:
|
||||
/// For the older format version calculates rows count from the size of a column with a fixed size.
|
||||
void loadRowsCount();
|
||||
|
||||
/// Load existing rows count from _row_exists column if load_existing_rows_count_for_old_parts is true.
|
||||
/// Load existing rows count from _row_exists column
|
||||
/// if load_existing_rows_count_for_old_parts and exclude_deleted_rows_for_part_size_in_merge are both enabled.
|
||||
void loadExistingRowsCount();
|
||||
|
||||
static void appendFilesOfRowsCount(Strings & files);
|
||||
|
Loading…
Reference in New Issue
Block a user