84669인 학습
152542인 학습
20005인 학습
5487인 학습
7821인 학습
359900인 학습
3350인 학습
180660인 학습
48569인 학습
18603인 학습
40936인 학습
1549인 학습
1183인 학습
32909인 학습
在命令行中操作mongodb,db.testrests.find({})要想知道这条语句的时间,要怎么查看那?
db.testrests.find({})
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,然后查看日志,例如: