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

Optimize ORDER BY clause (physical_orderby) #52

Closed
Mytherin opened this issue Dec 6, 2018 · 2 comments
Closed

Optimize ORDER BY clause (physical_orderby) #52

Mytherin opened this issue Dec 6, 2018 · 2 comments
Assignees

Comments

@Mytherin
Copy link
Collaborator

Mytherin commented Dec 6, 2018

The current ORDER BY implementation has very poor performance because it uses generic types (Value::) which means type checking is done for every single comparison. The performance can be greatly improved by switching to templated comparisons.

@Mytherin Mytherin changed the title (Execution) Optimize ORDER BY clause (physical_orderby) Optimize ORDER BY clause (physical_orderby) Dec 7, 2018
@Mytherin Mytherin added this to To do in First Release Dec 7, 2018
@Mytherin Mytherin moved this from To do to In progress in First Release Dec 7, 2018
@hannes hannes mentioned this issue Jan 4, 2019
@hannes
Copy link
Member

hannes commented Jan 13, 2019

Going to have a look here since it impacts window functions. Also ChunkCollection should probably store the last orderbydescription that was used to sort it so that we can avoid re-sorting. This is highly relevant for multiple window functions with same window definition.

@hannes hannes self-assigned this Jan 13, 2019
@hannes
Copy link
Member

hannes commented Jan 13, 2019

The comparison is using templated ops now. Next the scan of the chunk collection according to a sorted vec.

@hannes hannes moved this from In progress to Done in First Release Jan 13, 2019
@hannes hannes closed this as completed Jan 13, 2019
Mytherin pushed a commit that referenced this issue Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
First Release
  
Done
Development

No branches or pull requests

3 participants