关于explain

> db.imooc_2.find({x:1}).explain()
{
    "queryPlanner" : {
        "plannerVersion" : 1,
        "namespace" : "test.imooc_2",
        "indexFilterSet" : false,
        "parsedQuery" : {
            "x" : {
                "$eq" : 1
            }
        },
        "winningPlan" : {
            "stage" : "COLLSCAN",
            "filter" : {
                "x" : {
                    "$eq" : 1
                }
            },
            "direction" : "forward"
        },
        "rejectedPlans" : [ ]
    },
    "serverInfo" : {
        "host" : "vnc19216859189.lan",
        "port" : 12345,
        "version" : "4.0.0",
        "gitVersion" : "3b07af3d4f471ae89e8186d33bbb1d5259597d51"
    },
    "ok" : 1
}

 

用explain,能看到这次查询的详细信息,就像之前的profile一样
posted @ 2018-08-13 06:25  wzndkj  阅读(124)  评论(0编辑  收藏  举报