开发者

MongoDB: how to prevent mongod from printing textually long queries to stdout?

开发者 https://www.devze.com 2023-04-10 14:20 出处:网络
In my use case, I occasionally need to retrieve many 1000s of rows by ID and use a query of the form:

In my use case, I occasionally need to retrieve many 1000s of rows by ID and use a query of the form:

db.myCollection.find({_id:{$in:[ID1, ID2, ID3, …]})

The mongod process always dumps the text of these queries to stdout, and it appears that most of the query time is spent doing so.

I’ve tried the “--quiet” and “--diaglog 0” (oplogging off) and even the unrelated “--nojournal”, which seemed to be the only command line parameters that might control this (http://www.mongodb.org/display/DOCS/Command+Line+Parameters).

How can I get mongod to NOT display the text of these queries, so as to improve per开发者_运维技巧formance?


The problem here is with the Profiler. The Profiler is responsible for managing this output.

0

精彩评论

暂无评论...
验证码 换一张
取 消