mongoDB索引分析

db.tb3.find().explain('executionStats')
结果如下:
{
    "queryPlanner" : {
        "plannerVersion" : 1,
        "namespace" : "test.tb3",
        "indexFilterSet" : false,
        "parsedQuery" : {
            
        },
        "winningPlan" : {
            "stage" : "COLLSCAN",
            "direction" : "forward"
        },
        "rejectedPlans" : [ ]
    },
    "executionStats" : { // 执行计划相关统计信息
        "executionSuccess" : true, // 执行成功的状态
        "nReturned" : 3, // 返回结果集数量
        "executionTimeMillis" : 0, // 执行所需的时间,毫秒
        "totalKeysExamined" : 0, // 索引检查的时间
        "totalDocsExamined" : 3, // 查询文档总数
        "executionStages" : {
            "stage" : "COLLSCAN", // 索引扫描方式(COLLSCAN 全表扫描;IXSCAN 索引扫描; FETCH 根据索引去检索指定document)
            "nReturned" : 3, // 返回结果集数量
            "executionTimeMillisEstimate" : 0, // 预估的执行时间,毫秒
            "works" : 5, // 工作单元数,一个查询会被派生为一些小的工作单元
            "advanced" : 3, // 优先返回的结果数量
            "needTime" : 1,
            "needYield" : 0,
            "saveState" : 0,
            "restoreState" : 0,
            "isEOF" : 1,
            "direction" : "forward", // 方向
            "docsExamined" : 3 // 文档检查数量
        }
    },
    "serverInfo" : {
        "host" : "e8797fbe90f9",
        "port" : 27017,
        "version" : "4.4.2",
        "gitVersion" : "15e73dc5738d2278b688f8929aee605fe4279b0e"
    },
    "ok" : 1
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值