(ALL-AI)即刻去做&愿有前程可奔赴&亦有岁月可回头

Home Archives
2025-12-24

251224-MongoDB-SlowQuery慢查询定位

1. 直接读 system.profile(最常用)


打开数据库级别的 Profiling

1
2
use vatti
db.setProfilingLevel(1, 500); -- 记录 >50 ms 的操作

2. 可看到慢查询字段

1
2
3
4
db.system.profile.find({millis:{$gte:500}})
.sort({ts:-1})
.limit(1000)
.pretty();
Teilen
Neuer
260106-wincc采集数据-监控OMS-连接是否有效
Älter
251210-google-chrome-bookmark-谷歌浏览器导出书签

Archiv

  • 一月 2026
  • 十二月 2025
  • 十一月 2025
  • 十月 2025
  • 九月 2025
  • 八月 2025
  • 七月 2025
  • 六月 2025
  • 五月 2025

letzter Beitrag

  • Hello World
  • 260123-windows 11 开机后必须在电脑上输入密码后,才能远程,是怎么回事
  • 260121-Ubuntu生成docker证书
  • 260121-ubuntu 域名ping 提示Temporary failure in name resolution-ping-baidu.com
  • 260119-linux-redis离线安装
© 2026 Owen.Chen
Powered by Hexo
Home Archives