-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up Set index a little #64098
Speed up Set index a little #64098
Conversation
|
This is an automated comment for commit dcf410a 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
|
BTW, once I noticed that set max_threads=1;
create table ind_minmax(A Int64, B Int64, index x1 B type minmax granularity 1)
Engine MergeTree order by A as select number, cityHash64(number)%111111=1 from numbers(1e8);
optimize table ind_minmax final;
create table ind_set(A Int64, B Int64, index x1 B type set(2) granularity 1)
Engine MergeTree order by A as select number, cityHash64(number)%111111=1 from numbers(1e8);
optimize table ind_set final;
select count() from ind_minmax where B = 1;
Elapsed: 0.015 sec. Processed 7.26 million rows
select count() from ind_set where B = 1;
Elapsed: 0.060 sec. Processed 7.26 million rows
drop table ind_set;
drop table ind_minmax; 0.015 sec vs 0.060 sec |
because we check predicate against all set elements. it is known sub-optimality (lack of min-max for set) |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Speed up indices of type
set
a little (around 1.5 times) by removing garbage.Modify your CI run
NOTE: If your merge the PR with modified CI you MUST KNOW what you are doing
NOTE: Checked options will be applied if set before CI RunConfig/PrepareRunConfig step
Include tests (required builds will be added automatically):
Exclude tests:
Extra options:
Only specified batches in multi-batch jobs: