1 查看是否开启慢查询

db.getProfilingStatus()

 

2 开启慢查询 

 db.setProfilingLevel(1,100); 

 

3 查看慢查询 

db.system.profile.find();

 

相关文章: