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

🤔 [ISSUE] - (N +1 query problem) preUpdateMany block.repository.ts #536

Open
abdou6666 opened this issue Jan 8, 2025 · 3 comments · May be fixed by #549
Open

🤔 [ISSUE] - (N +1 query problem) preUpdateMany block.repository.ts #536

abdou6666 opened this issue Jan 8, 2025 · 3 comments · May be fixed by #549
Assignees
Labels
good first issue Good for newcomers SWOC Social Winter of Code 2025

Comments

@abdou6666
Copy link
Member

abdou6666 commented Jan 8, 2025

Description

current implementation of preUpdateMany loops through the ids and uses findOne on each of the ids , we can use this this.repository.find({ _id: { $in: ids } }); instead to decrease number of queries & improve performance , we might need to adapt the logic & write new tests

@abdou6666 abdou6666 added good first issue Good for newcomers SWOC Social Winter of Code 2025 labels Jan 8, 2025
@omarNaifer12
Copy link

Hi @abdou6666, I’d like to work on this issue.

@medchedli
Copy link
Contributor

Thanks @omarNaifer12 I will assign this to you. You can start to tackle this issue, let'us know if you need any help.

@omarNaifer12
Copy link

Thank you @medchedli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers SWOC Social Winter of Code 2025
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants