-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When find request is executed with pagination actual find and count requests are executed sequentially.
node-mongo/src/mongo-query-service.js
Lines 32 to 41 in 7f13742
| const results = await this._collection.find(query, options); | |
| if (!hasPaging) { | |
| return { | |
| results, | |
| }; | |
| } | |
| const countOptions = {}; | |
| if (options.session) countOptions.session = options.session; | |
| const count = await this._collection.count(query, countOptions); |
Instead this could be performed in parallel noticeably improving performance for long-running DB requests
Metadata
Metadata
Assignees
Labels
No labels