mongodb用explain(),为啥看不到执行时间,和文档扫描数量?
db.playlists.find({}).explain() { “queryPlanner” : { “plannerVersion” : 1, “namespace” : “XXXXX.playlists”, “indexFilterSet” : false, “parsedQuery” : { "$and" : [ ] }, “winningPlan” : { “stage” : “COLLSCAN”, “filter” : { "$and" : [ ] }, “direction” : “forward” }, “rejectedPlans” : [ ] }, “serverInfo” : { “host” : “XXXXXXXX”, “port” : XXXXX, “version” : “3.0.6”, “gitVersion” : “1ef45a23a4c5e3480ac919b28afcba3c615488f2” }, “ok” : 1 }
4 回复
是2.x还是3.x
version() 3.0.6
explain(“executionStats”)
https://docs.mongodb.org/v3.0/reference/method/cursor.explain/
@chita,谢谢!