[COMPASS-4587] The initial document count (with empty filter) is very slow Created: 26/Jan/21 Updated: 27/Oct/23 Resolved: 02/Sep/22 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Collection, CRUD, Query |
| Affects Version/s: | 1.25.0 |
| Fix Version/s: | No version |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Maurizio Casimirri | Assignee: | Unassigned |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Story Points: | 3 | ||||
| Documentation Changes: | Not Needed | ||||
| Description |
|
The initial document count is very slow since the server seems to be scanning the whole collection. To reproduce: try to load a big collection, the first load will take seconds. Moving to next page afterwards (which does not involve re-counting) is almost instantaneous. I'd expect the first page load to be as fast as the next page since the same amount of documents are loaded. Possible fixes:
|