[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:

{
"cursor" : "BtreeCursor l_1_group_1",
"nscanned" : 0,
"nscannedObjects" : 0,
"n" : 0,
"millis" : 2,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : false,
"indexBounds" : {
"l" : [
[
"eng",
"eng"
]
],
"group" : [
[

{ "$minElement" : 1 }

,

{ "$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.

Generated at Thu Feb 08 03:03:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.