1、find操作请直接使用explain,例如: db.tablename.find().explain( "executionStats" ) 关注输出的如下数值:explain.executionStats.executionTimeMillis 2、Update/delete/insert操作,请设置profile,然后查看日志,例如: db.setProfilingLevel(2) db.getProfilingLevel() db.system.profile.find()
1、find操作请直接使用explain,例如:
2、Update/delete/insert操作,请设置profile,然后查看日志,例如: