前提:不使用limit()。
已知每次会显示20条记录,且输入it会显示更多命令。
我的困惑在于,MongoDB是否已经获得了全部的查询结果,只是选择了分页呈现。
怪我咯2017-04-24 09:12:37
Displaying 20 items at a time is just that the mongo shell limits it to 20 items at a time in order to improve the readability of the user interface. This problem does not occur when the application uses the driver to interact.
You can also modify the value of 20. Enter below the shell:
DBQuery.shellBatchSize = 50
It will display 50 items at a time