John23
John23

Reputation: 13

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

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 performance?

Upvotes: 1

Views: 359

Answers (1)

Gates VP
Gates VP

Reputation: 45297

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

Upvotes: 1

Related Questions