How many records does MongoDB get in a query?

  mongodb, question

Premise: limit () is not used.

It is known that 20 records will be displayed at a time, and entering IT will display more commands.

My puzzle is whether MongoDB has already obtained all the query results, and only chose pagination presentation.

The display of 20 items at a time is just a limit of 20 items for mongo shell to improve the readability of the user interface. This problem does not occur when applications use drivers to interact.

You can also modify the value of 20. Enter below the shell:
DBQuery.shellBatchSize = 50

50 will be displayed once.