[SERVER-40873] Poor performance on certain configurations of hint/limit/min/max Created: 27/Apr/19 Updated: 06/May/19 Resolved: 06/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Performance, Querying |
| Affects Version/s: | 3.4.20, 4.0.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ryan Keener | Assignee: | Eric Sedor |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
I've run into a performance issue when using min/limit/hint without max that I'd like some insight on. I've got an index called sort_updated_at on my collection:
Note: there are 15 total entries in the db with client_id : "cl_cjr7ucmwi00030xqip5ez34ym" If I make the following query
This has very good performance
However, if I remove the max configuration I get the following despite the client_id restriction in the original query:
Finally, if I also remove the min configuration I see the performance improve again
I've attached {[explain}} results for each of the above three scenarios using mongodb 3.4.20 and 4.0.3 as well as the corresponding server info. What am I missing? |
| Comments |
| Comment by Ryan Keener [ 01/May/19 ] |
|
It seems odd that And seeing as SERVER-8045 is about to turn 6.5 years old I'm guessing that this is not a top priority. |
| Comment by Kevin Pulo [ 01/May/19 ] |
|
See also |
| Comment by Eric Sedor [ 29/Apr/19 ] |
|
Hi bendru, please check out this documentation. If you have questions, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag. This is because the SERVER project is for bugs and feature suggestions for the MongoDB server. |