Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
Linux
Description
db.Trade.find({
|
'startDate': {$lte: ISODate("2017-09-08T00:00:00.000Z")},
|
$or: [
|
{
|
'endDate': {$gte: ISODate("2017-09-08T00:00:00.000Z")}
|
},
|
{
|
'endDate': {$exists: false}
|
}
|
]
|
}).sort({'date': -1}).limit(100).explain('executionStats')
|
There are indexes in startDate_1_endData_1 and data_1
As the executionStats description, the query will use the data_1 index.
In executionStats, it run 3s, but actually, it run 80s