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

Performance Issues with Query Builder #1005

Open
wisac opened this issue Oct 18, 2024 · 2 comments
Open

Performance Issues with Query Builder #1005

wisac opened this issue Oct 18, 2024 · 2 comments

Comments

@wisac
Copy link

wisac commented Oct 18, 2024

Hello,

I'm really enjoying using this library in my project, and it's making things much easier for me. However, I'm currently facing a performance issue when using the Query Builder with nestjs-paginate.

When I use paginate with the Query Builder, the average query execution time is around 5 seconds. In contrast, when I use the repository with nest-paginate, the same query executes in less than 1 second. Occasionally, the performance improves slightly, but it tends to revert to being slow again.
I understand my paginate config and relations could be affecting performance but I use the same paginate config for the repository and it works fine

For context, I'm using PostgreSQL 16 running on localhost

Any help or insights would be greatly appreciated.

Thanks!

CODE:
Screenshot from 2024-10-17 23-26-22

WITH QUERY BUILDER (TIME IN MILLISEC):
Screenshot from 2024-10-17 23-33-54

WITH REPO (TIME IN MILLISEC):
Screenshot from 2024-10-17 23-37-06

@Helveg
Copy link
Collaborator

Helveg commented Oct 18, 2024

Perhaps related to: #329 ?

@jongomes
Copy link

jongomes commented Nov 8, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants