Repository navigation
MergeTree FINAL extract non intersecting parts ranges - #58120
alexey-milovidov merged 6 commits into
Conversation
|
Table without duplicates: Before: After: The same as without final: Table with some intersecting ranges: Before: After: Setting do_not_merge_across_partitions_select_final performance improvements: Create table: Before: After: |
|
This is an automated comment for commit df6bec5 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
|
For ReplacingMergeTree, test like that is more likely |
Thanks for test. Before: After: |
f83578b to
19843ed
Compare
e7eb1eb to
c1f1a0e
Compare
86d3503 to
a85e2cd
Compare
a85e2cd to
c595906
Compare
| * | ||
| * Additional details: | ||
| * | ||
| * 1. If part level is 0, we must process all ranges from this part, because they can contain duplicate primary keys. |
There was a problem hiding this comment.
This assumption is incorrect for ReplacingMergeTree with is_deleted column, and that's why 02814_ReplacingMergeTree_fix_select_final_on_single_partition was broken
See also 95e4b00
|
The code is quite tricky and it handles many corner cases, so please consider introducing a setting like Also, there's a lack of introspection/logging, so it will be hard to debug potential issues |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Extract non intersecting parts ranges from MergeTree table during FINAL processing. That way we can avoid additional FINAL logic for this non intersecting parts ranges. In case when amount of duplicate values with same primary key is low, performance will be almost the same as without FINAL. Improve reading performance for MergeTree FINAL when
do_not_merge_across_partitions_select_finalsetting is set.