Mongodb profiling

Mongodb profiling是Mngodb提供的类似于mysql的慢查询的功能,用于记录执行时间超过多少的语句,默认记录在system.profile中。
2、开启profiling功能
通过客户端开启

profile级别有三种:
0:不开启
1:记录慢命令,默认为大于100ms
2:记录所有命令
3、查询profiling记录

db.system.profile.find({})

http://docs.mongodb.org/manual/reference/command/profile/

猜你喜欢

转载自huaxiamian.iteye.com/blog/2233197