node-mongo icon indicating copy to clipboard operation
node-mongo copied to clipboard

Execute find and count queries in parallel for paginated requests

Open winrono opened this issue 3 years ago • 0 comments

When find request is executed with pagination actual find and count requests are executed sequentially.

https://github.com/paralect/node-mongo/blob/7f1374290276d8468c215731e509aa29a8ba9d0a/src/mongo-query-service.js#L32-L41

Instead this could be performed in parallel noticeably improving performance for long-running DB requests

winrono avatar May 02 '21 18:05 winrono