-
Notifications
You must be signed in to change notification settings - Fork 218
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
Fix joins against the same table when not necessary #127
Comments
Optimizing the join away would the most awesome thing to do. I think that this might be doable in core of the query engine actually. The problem here is that we are using a |
This should be work done after merging the Dom Branch (tm) and asyncification? |
So, if we start working on the async/await tomorrow with Dom, I doubt this will be in p16. |
P16 milestone only means that it is being worked on right now, if it is not done we will move it over to P17. |
I will spend some time here this week :) |
Let's take a GraphQL query:
This leads to two queries in
query-engine
:This one is merely a 24ms query, which is already quite slow, but nothing compared to the following:
Taking whopping 300ms to execute.
Now we don't need to join with the same table to get the same results, using a bit faster but still monstrous query:
Resulting in 170ms execution time.
Now if we'd be smart, we'd skip the two queries and combine them into one:
This skips one roundtrip, but the resulting query is not that much faster, execution time being 170ms.
Before starting the ticket we should consider:
Would both of these options break some use cases?
The text was updated successfully, but these errors were encountered: