MongoDB索引建立以及查询性能分析

查询性能分析 文档总数: 执行性能分析 db.user_login_log.find({ id: "11598978", month: "201902" }).explain('executionStats') 未加索引前: 查询需要耗费173ms 加索引后: 在用户id字段和月份字段添加索引,注意:后台添加索引,否则可能锁库 db.集合名.createIndex({"字段名":1
相关文章
相关标签/搜索