LoginSignup
9
6

More than 5 years have passed since last update.

Mongoシェルのfindで20件以上表示させる方法

Posted at

MongoDBのMongoシェルでfindした時に、結果が20件以上だとType "it" for moreと出ますが、それを増やす場合にはDBQuery.shellBatchSizeをつかえばOKです。

DBQuery.shellBatchSize = 300 #<-表示させたい件数

これには理由があって、Mongoシェルのオペレーションで気軽に全件表示できるとMongoにフルスキャンと同等の高い負荷がかかるので、一回のフェッチサイズを20件にしているのです。

9
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
6