Mongodb on Server运行速度很慢

时间:2018-03-23 07:24:36

标签: mongodb

我在服务器上使用mongodb 3.4版。 Mongo日志显示我的聚合查询需要大约108ms的时间来执行。

planSummary: COLLSCAN keysExamined:0 docsExamined:2263 hasSortStage:1 numYields:19 nreturned:0 reslen:50

这是此类查询之一的计划摘要。任何人都可以告诉我这个查询是否正常或者花了太多时间。

另外,我不是在聚合中使用游标。所以有这个错误

> Use of the aggregate command without the 'cursor' option is
> deprecated. See
> http://dochub.mongodb.org/core/aggregate-without-cursor-deprecation.

但是查询运行正常。

我已经在Amazon AWs上托管了我的服务器,明确为Mongodb提供了1 GB ram。

在运行此类查询时,它占用了99%的CPU。

可以使用'cursor'修复它吗?

运行这些查询时,CPU消耗量异常高(99.7%)。即使是单个查询也会执行这么多处理,从而减慢了使用Mongo的网站部分的速度。

0 个答案:

没有答案