0

从6百多万条数据中查一万条数据(数据大小一共1.2m左右)用了10几秒

下面是执行计划:

\”executionStats\”:{\”executionSuccess\”:true,\”nReturned\”:14876.0,\”executionTimeMillis\”:13805.0,\”totalKeysExamined\”:14876.0,\”totalDocsExamined\”:14876.0,\”executionStages\”:{\”stage\”:\”FETCH\”,\”nReturned\”:14876.0,\”executionTimeMillisEstimate\”:13646.0,\”works\”:14877.0,\”advanced\”:14876.0,\”needTime\”:0.0,\”needYield\”:0.0,\”saveState\”:573.0,\”restoreState\”:573.0,\”isEOF\”:1.0,\”invalidates\”:0.0,\”docsExamined\”:14876.0,\”alreadyHasObj\”:0.0,\”inputStage\”:{\”stage\”:\”IXSCAN\”,\”nReturned\”:14876.0,\”executionTimeMillisEstimate\”:181.0,\”works\”:14877.0,\”advanced\”:14876.0,\”needTime\”:0.0,\”needYield\”:0.0,\”saveState\”:573.0,\”restoreState\”:573.0,\”isEOF\”:1.0,\”invalidates\”:0.0,\”keyPattern\”:{\”hub_id\”:1.0,\”date\”:-1.0},\”indexName\”:\”hub_id_1_date_-1\”,\”isMultiKey\”:false,\”multiKeyPaths\”:{\”hub_id\”:[],\”date\”:[]},\”isUnique\”:false,\”isSparse\”:false,\”isPartial\”:false,\”indexVersion\”:2.0,\”direction\”:\”forward\”,\”indexBounds\”:{\”hub_id\”:[\”[268436262.0, 268436262.0]\”],\”date\”:[\”[1644228798.0, 1641550398.0]\”]},\”keysExamined\”:14876.0,\”seeks\”:1.0,\”dupsTested\”:0.0,\”dupsDropped\”:0.0,\”seenInvalidated\”:0.0}}}

已回答的问题