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

Optimization for distributed GROUP BY with ORDER BY without aggregate functions. #8829

Open
alexey-milovidov opened this issue Jan 25, 2020 · 0 comments

Comments

@alexey-milovidov
Copy link
Member

alexey-milovidov commented Jan 25, 2020

Use case
If the query contains GROUP BY and either does not contain ORDER BY or contains ORDER BY that does not depend on aggregate functions and only possibly depend on aggregation keys and does not depend on non-deterministic functions or there is no aggregate functions, we should apply ORDER BY transformation with LIMIT on remote servers. If there is no ORDER BY but aggregate functions are present, add implicit ORDER BY keys.

This will help to send less amount of data over network and parallelize ORDER BY.

@alexey-milovidov alexey-milovidov changed the title Distributed GROUP BY with ORDER BY without aggregate functions. Optimization for distributed GROUP BY with ORDER BY without aggregate functions. Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant