Skip to content
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

POC: Eliminate unnecessary group by keys (q35 in clickbench 1.35x faster) #13617

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Rachelint
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the optimizer Optimizer rules label Dec 1, 2024
@github-actions github-actions bot added the core Core DataFusion crate label Dec 1, 2024
@github-actions github-actions bot removed the core Core DataFusion crate label Dec 1, 2024
@Rachelint
Copy link
Contributor Author

Rachelint commented Dec 1, 2024

It is really effective for query like q35 in clickbench.

// Before
Q35: SELECT "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3, COUNT(*) AS c FROM hits GROUP BY "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3 ORDER BY c DESC LIMIT 10;
Query 35 iteration 0 took 2371.1 ms and returned 10 rows

// After
Q35: SELECT "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3, COUNT(*) AS c FROM hits GROUP BY "ClientIP", "ClientIP" - 1, "ClientIP" - 2, "ClientIP" - 3 ORDER BY c DESC LIMIT 10;
Query 35 iteration 0 took 1491.4 ms and returned 10 rows

@Rachelint Rachelint changed the title POC: Eliminate unnecessary group keys for q35 in clickbench POC: Eliminate unnecessary group keys (q35 in clickbench 1.35x faster) Dec 1, 2024
@Rachelint Rachelint changed the title POC: Eliminate unnecessary group keys (q35 in clickbench 1.35x faster) POC: Eliminate unnecessary group by keys (q35 in clickbench 1.35x faster) Dec 1, 2024
@Rachelint
Copy link
Contributor Author

It's late today, plan to sort out codes and add test tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant