Enable use_top_k_dynamic_filtering and use_skip_indexes_for_top_k by default#99537
Enable use_top_k_dynamic_filtering and use_skip_indexes_for_top_k by default#99537alexey-milovidov wants to merge 15 commits intomasterfrom
use_top_k_dynamic_filtering and use_skip_indexes_for_top_k by default#99537Conversation
… by default Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Workflow [PR], commit [3c7c91d] Summary: ❌
AI ReviewSummaryThis PR flips defaults for ClickHouse Rules
Final Verdict
|
|
I will check the failures. |
|
@shankar-iyer FYI, it is #91782 |
|
@alexey-milovidov Let's enable only |
I see it as a solid use-case. And indices by default will not always be enabled; there will be plenty of use cases without them. Why to afraid? |
Best case - But this one - If there is not many rows to sort after filters, we have additional overhead of reading a 4-byte/8-byte column (Numeric/Date). What do you say - enable it and real world workloads should balance out? All the test failures are not due to any issue in the optimization, but due to change in rows_read profile event, which I can address. |
Yes, I think it will be beneficial on average! |
|
Working on that in #91782 |
Disable `use_top_k_dynamic_filtering` and `use_skip_indexes_for_top_k` in the test that checks read_rows for ORDER BY LIMIT, since these optimizations change the reading strategy and are not what this test validates. Restore the accidentally removed empty 26.4 version placeholders in SettingsChangesHistory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…o enable-top-k-optimizations-by-default
…ickHouse/ClickHouse into enable-top-k-optimizations-by-default
…zations-by-default
1c18b6e to
7b20276
Compare
…zations-by-default # Conflicts: # src/Core/Settings.cpp
LLVM Coverage Report
Changed lines: 100.00% (21/21) · Uncovered code |
Summary
use_top_k_dynamic_filteringanduse_skip_indexes_for_top_ksettings by defaultChangelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Enable
use_top_k_dynamic_filteringanduse_skip_indexes_for_top_ksettings by default to improve performance ofORDER BY ... LIMIT Nqueries.Documentation entry for user-facing changes
No documentation changes needed — the settings and their documentation already exist; only the default values changed.