[SERVER-2556] Query with empty $nin takes considerably longer than without it Created: 15/Feb/11 Updated: 30/Mar/12 Resolved: 23/Feb/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lennart Koopmann | Assignee: | Aaron Staple |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
I noticed this behavior when searching for slow queries: Queries using an empty $nin modifier take a lot more time to finish than queries not including the empty lennart ~$ mongo } > db.messages.find( {deleted:false}).explain(); } This is a 400ms difference for 185998 documents in the collection. I noticed this in a collection with ~4,000,000 documents (on a not that fast machine) and got a difference of 20 seconds. "message" always has a String as value. Let me know if you need any more information. |
| Comments |
| Comment by Aaron Staple [ 23/Feb/11 ] |
|
I think we can let SERVER-2565 cover this issue. |
| Comment by Aaron Staple [ 16/Feb/11 ] |
|
Saw a difference on my machine as well. Filed SERVER-2565. |