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.
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 around5 seconds.
In contrast, when I use therepository with nest-paginate,
the same query executes inless 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 fineFor context, I'm using PostgreSQL 16 running on localhost
Any help or insights would be greatly appreciated.
Thanks!
CODE:
WITH QUERY BUILDER (TIME IN MILLISEC):
WITH REPO (TIME IN MILLISEC):