我的 q_development.users 表有超过 1,000,000 条记录。奇怪的是,我的 mongodb 在这个集合上记录了一些耗时较长的项目,而没有明确记录查询是什么。ntoreturn
MongoDB甚至不记录ntoskip
这些查询。这是非常可疑的,因为reslen
它们都是一样的。日志如下所示
Fri May 25 00:01:00 [conn56429] query q_development.users nscanned:1207786 reslen:20 2390ms
Fri May 25 00:09:09 [conn55528] query q_development.users nscanned:1207799 reslen:20 2623ms
Fri May 25 00:11:11 [conn55529] query q_development.users nscanned:1207800 reslen:20 2660ms
Fri May 25 00:28:56 [conn55586] query q_development.users nscanned:1207823 reslen:20 2777ms
Fri May 25 00:46:45 [conn55529] query q_development.users nscanned:1207850 reslen:20 4218ms
Fri May 25 00:47:46 [conn56169] query q_development.users nscanned:1207851 reslen:20 2392ms
Fri May 25 01:30:49 [conn57141] query q_development.users nscanned:1207901 reslen:20 4289ms
你知道哪些可能的查询可以生成这样的 mongodb.log 项目吗?非常感谢!