一、mongodb慢查詢的作用:
二、mongodb開啟慢查詢的缺點:
三、mongodb開啟查詢慢查詢:
四、mongodb慢查詢輸入字段含義:
1、查詢結(jié)果大于5毫秒的請求:
>db.system.profile.find().sort({millis:-1}).limit(10);
2、帶有執(zhí)行時間倒序查詢:
>db.system.profile.find({
ts : {
$gt : new ISODate("2013-05-09T03:00:00Z") ,
$lt : new ISODate("2013-05-17T09:40:00Z")
}
}
).sort( { millis : -1 } )