I run explain on the following query:
db.explain().find({ site_id:1, dimensions:[], create_date: { $gte: new Date(1452603948196) } )
The result contains a 'filter' object over the dimensions field, while it should have filtered that field using the index, what does it mean ? isn't it a redundant stage?
{ "winningPlan" : {
"stage" : "FETCH",
"filter" : {
"dimensions" : {
"$eq" : [ ]
}
},
"inputStage" : {
"stage" : "IXSCAN",
"keyPattern" : {
"site_id" : 1,
"dimensions" : 1,
"create_date" : 1
}, }
as far as i understand it means that mongo filter the dimensions field again after it is scanning the index and fetch the documents into memory, is it correct?
thanks,
Your results will be filtered based on the criteria that dimensions are equal to values given in the array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With