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

improve query performance for joins #55

Open
seiyria opened this issue Nov 22, 2022 · 0 comments
Open

improve query performance for joins #55

seiyria opened this issue Nov 22, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@seiyria
Copy link
Member

seiyria commented Nov 22, 2022

right now, any time a "join" happens (decksWithAuthors being one such join), the query performance is bad because it doesn't cache results, so if every returned deck has the same author it queries it each time.

looks like it needs aggregation pipelines: https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup/

which might be frustrating, might not: https://mikro-orm.io/docs/3.6/usage-with-mongo

@seiyria seiyria added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant