-
Notifications
You must be signed in to change notification settings - Fork 25
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
[Lake][Subgraph] Improve query structure (and maybe performance) #575
Comments
NotesOverall, we have low conviction around problems/improvements as a result of this update. |
We can improve the fetch step by returning more of the expected records from predictPredictions. By doing this, we can reduce the need to fetch the predictPayouts table. We would still need to handle the predctTruevals. If we can improve the number of fetches and compute further, consider increasing priority.
|
I spent some time and let me explain why the first example won't work. Based on the provided GraphQL query, it seems that you want to filter predictPayouts based on a specific predictContract value. Tha query is not convenient for this goal
In this query:
The limitation here is that the filtering for predictContract does not directly filter the predictPayouts.
I feel like we did a short talk about it but I couldn't be sure and I explained with text |
There are still low performance queries and other things that aren't optimal but i'm closing this issue and moving everything to #1299 for further review |
Motivation
There are various queries inside
subgraph/
that may perform less than optimal due to their structure. Nested where clauses may improve the performance or not.Queries such as the one inside
subgraph_payouts.py
could perhaps be improved.Examples
How to restructure
predictPayouts
such that we can implement an_in array[]
where clause.DoD:
The text was updated successfully, but these errors were encountered: