[MongoDB] Display Count in mongo shell Can Be Set with DBQuery.shellBatchSize

Tadashi Shigeoka ·  Fri, October 24, 2014

The default display count in mongo shell is 20 items, but to change this, you can modify the value of DBQuery.shellBatchSize.

MongoDB | モンゴディービー

// If you want to set the display count to 500 items
DBQuery.shellBatchSize = 500;

When you know in advance how many results a query will return, setting that count allows you to output all results at once, which is convenient because you don’t need to type “it”.

db.users.find()
...
Type "it" for more

// Normally you'd have to type "it" every 20 items

That’s all.

Reference Information

That’s all from the Gemba.