0

\”executionStats\” : {
\”nReturned\” : 1309440,
\”executionTimeMillis\” : 1694,
\”totalKeysExamined\” : 1309440,
\”totalDocsExamined\” : 0,
\”executionStages\” : {
\”stage\” : \”SINGLE_SHARD\”,
\”nReturned\” : 1309440,
\”executionTimeMillis\” : 1694,
\”totalKeysExamined\” : 1309440,
\”totalDocsExamined\” : 0,
\”totalChildMillis\” : NumberLong(1689),
\”shards\” : [
{
\”shardName\” : \”shard2\”,
\”executionSuccess\” : true,
\”executionStages\” : {
\”stage\” : \”SHARDING_FILTER\”,
\”nReturned\” : 1309440,
\”executionTimeMillisEstimate\” : 273,
\”works\” : 1309441,
\”advanced\” : 1309440,
\”needTime\” : 0,
\”needYield\” : 0,
\”saveState\” : 10231,
\”restoreState\” : 10231,
\”isEOF\” : 1,
\”chunkSkips\” : 0,
\”inputStage\” : {
\”stage\” : \”IXSCAN\”,
\”nReturned\” : 1309440,
\”executionTimeMillisEstimate\” : 87,
\”works\” : 1309441,
\”advanced\” : 1309440,
\”needTime\” : 0,
\”needYield\” : 0,
\”saveState\” : 10231,
\”restoreState\” : 10231,
\”isEOF\” : 1,
\”keyPattern\” : {
\”tenantid\” : 1,
\”dayTime\” : 1
},
\”indexName\” : \”tenantid_1_dayTime_1\”,
\”isMultiKey\” : false,
\”multiKeyPaths\” : {
\”tenantid\” : [ ],
\”dayTime\” : [ ]
},
\”isUnique\” : false,
\”isSparse\” : false,
\”isPartial\” : false,
\”indexVersion\” : 2,
\”direction\” : \”forward\”,
\”indexBounds\” : {
\”tenantid\” : [
\”[\\\”5c6545ac-15c4-4631-8a7e-194011997865\\\”, \\\”5c6545ac-15c4-4631-8a7e-194011997865\\\”]\”
],
\”dayTime\” : [
\”[\\\”20190105\\\”, \\\”20190105\\\”]\”
]
},
\”keysExamined\” : 1309440,
\”seeks\” : 1,
\”dupsTested\” : 0,
\”dupsDropped\” : 0
}
}
}
]

Posted new comment

详细的执行计划:https://app.yinxiang.com/fx/6c6223b9-30ae-4840-ab53-464a64f935c4

同样的语句再跑一次有没有变快?