[SERVER-3503] Optimizer stats don't seem to be reset after new index Created: 29/Jul/11 Updated: 07/Mar/14 Resolved: 29/Jul/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.8.2 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Nic Cottrell (Personal) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
EL5 |
||
| Participants: |
| Description |
|
I had an existing index: {l:1, group:1}I've been doing queries like: { t: "<a href="/graphics-cards/asus-eah5670-di-512md5/">Asus EAH5670/DI/512M...", tLcHash: 8661900111881084748, l: "eng", g: { $ref: "Group", $id: ObjectId('4defe4897112ede06261f73a') }} so I added a new index in the foreground: {tLcHash:1, l:1, group:1}but immediately after, an explain shows: { , { "$maxElement" : 1 } ] Are the query stats not getting reset? |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 29/Jul/11 ] |
|
There aren't any query stats to get reset really. Neither index is a perfect match for that query, so the query optimizer will try both and return whichever finished first. |