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

Cache individual clauses of a filtering query #870

Open
arteymix opened this issue Sep 25, 2023 · 1 comment · May be fixed by #871
Open

Cache individual clauses of a filtering query #870

arteymix opened this issue Sep 25, 2023 · 1 comment · May be fixed by #871
Milestone

Comments

@arteymix
Copy link
Member

arteymix commented Sep 25, 2023

To enhance GemBrow performance with complex filters, we can break down the query in individual clauses, query their IDs, intersect those and then retrieve entities by IDs.

In practice, this will be greatly beneficial because a user only modify a clause at a time. All others will be retrieved from the cache.

This could be done in the Cached filtering service implementation as it make no sense to do this for uncached filters.

@arteymix
Copy link
Member Author

When retrieving entities by ID, we have an opportunity to load then from the cache instead of querying the database.

This is only applicable of the results are not sorted.

I wonder if it would be possible to sort individual queries and combine the results from the by-ID query. This would allow us to always lookup the cache and only retrieve missed entities.

@arteymix arteymix modified the milestones: 1.31.0, 1.32.0 Dec 5, 2023
@arteymix arteymix linked a pull request Oct 18, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant