美文网首页
MongoDB 执行语句记录查看方式

MongoDB 执行语句记录查看方式

作者: 霡霂976447044 | 来源:发表于2020-05-19 10:12 被阅读0次
use db_xxx
db.setProfilingLevel(2)
db.system.profile.find().pretty()

一定要切换到指定数据库!

清空记录

db.setProfilingLevel(0)
db.system.profile.drop()
db.setProfilingLevel(1)

Mongoengine 在对QuerySet对象进行迭代的时候才会去查询数据库,多次迭代使用缓存.

相关文章

网友评论

      本文标题:MongoDB 执行语句记录查看方式

      本文链接:https://www.haomeiwen.com/subject/iwuvohtx.html