MongoDB shell如何修改預設顯示文件的項的個數
用DBQuery.shellBatchSize命令,例如:
> DBQuery.shellBatchSize=30
30
這樣每頁就可以顯示30條文件記錄了:
> db.person.find()
{ "_id" : ObjectId("566682d98e31b1250ae8a9b4"), "name" : "duansf0", "age" : 0 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b5"), "name" : "duansf1", "age" : 1 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b6"), "name" : "duansf2", "age" : 2 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b7"), "name" : "duansf3", "age" : 3 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b8"), "name" : "duansf4", "age" : 4 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b9"), "name" : "duansf5", "age" : 5 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ba"), "name" : "duansf6", "age" : 6 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bb"), "name" : "duansf7", "age" : 7 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bc"), "name" : "duansf8", "age" : 8 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bd"), "name" : "duansf9", "age" : 9 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9be"), "name" : "duansf10", "age" : 10 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bf"), "name" : "duansf11", "age" : 11 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c0"), "name" : "duansf12", "age" : 12 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c1"), "name" : "duansf13", "age" : 13 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c2"), "name" : "duansf14", "age" : 14 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c3"), "name" : "duansf15", "age" : 15 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c4"), "name" : "duansf16", "age" : 16 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c5"), "name" : "duansf17", "age" : 17 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c6"), "name" : "duansf18", "age" : 18 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c7"), "name" : "duansf19", "age" : 19 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c8"), "name" : "duansf20", "age" : 20 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c9"), "name" : "duansf21", "age" : 21 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ca"), "name" : "duansf22", "age" : 22 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cb"), "name" : "duansf23", "age" : 23 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cc"), "name" : "duansf24", "age" : 24 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cd"), "name" : "duansf25", "age" : 25 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ce"), "name" : "duansf26", "age" : 26 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cf"), "name" : "duansf27", "age" : 27 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9d0"), "name" : "duansf28", "age" : 28 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9d1"), "name" : "duansf29", "age" : 29 }
>
> DBQuery.shellBatchSize=30
30
這樣每頁就可以顯示30條文件記錄了:
> db.person.find()
{ "_id" : ObjectId("566682d98e31b1250ae8a9b4"), "name" : "duansf0", "age" : 0 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b5"), "name" : "duansf1", "age" : 1 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b6"), "name" : "duansf2", "age" : 2 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b7"), "name" : "duansf3", "age" : 3 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b8"), "name" : "duansf4", "age" : 4 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9b9"), "name" : "duansf5", "age" : 5 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ba"), "name" : "duansf6", "age" : 6 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bb"), "name" : "duansf7", "age" : 7 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bc"), "name" : "duansf8", "age" : 8 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bd"), "name" : "duansf9", "age" : 9 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9be"), "name" : "duansf10", "age" : 10 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9bf"), "name" : "duansf11", "age" : 11 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c0"), "name" : "duansf12", "age" : 12 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c1"), "name" : "duansf13", "age" : 13 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c2"), "name" : "duansf14", "age" : 14 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c3"), "name" : "duansf15", "age" : 15 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c4"), "name" : "duansf16", "age" : 16 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c5"), "name" : "duansf17", "age" : 17 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c6"), "name" : "duansf18", "age" : 18 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c7"), "name" : "duansf19", "age" : 19 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c8"), "name" : "duansf20", "age" : 20 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9c9"), "name" : "duansf21", "age" : 21 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ca"), "name" : "duansf22", "age" : 22 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cb"), "name" : "duansf23", "age" : 23 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cc"), "name" : "duansf24", "age" : 24 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cd"), "name" : "duansf25", "age" : 25 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9ce"), "name" : "duansf26", "age" : 26 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9cf"), "name" : "duansf27", "age" : 27 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9d0"), "name" : "duansf28", "age" : 28 }
{ "_id" : ObjectId("566682db8e31b1250ae8a9d1"), "name" : "duansf29", "age" : 29 }
>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2121518/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- TOAD和PLSQL 預設日期顯示、rowid顯示、TNSNAME的修改SQL
- Mac 修改預設 shellMac
- 如何設定select下拉選單option項顯示的數目
- Linux 修改 預設 shellLinux
- 修改非同步樹的預設圖示非同步
- [提問交流]oneThink預設前臺分頁,每頁的資料條數顯示修改
- Jmeter中預設語言的顯示JMeter
- windows11右鍵預設顯示更多選項Windows
- Solaris 預設Shell的修改以及命令列補全的設定命令列
- openoffice如何顯示文件的文件結構或目錄結構
- Excel-修改Excel表格的預設下拉選項Excel
- 如何修改 React Native 的預設字型React Native
- 如何修改jquery的預設編碼方式jQuery
- jeefast框架 修改的下拉框三級聯動預設顯示後臺資料AST框架
- 修改預設 session 數量Session
- win10如何設定資料夾預設大圖示顯示_win10系統設定資料夾預設以大圖示顯示教程Win10
- 設定SAP後臺顯示和修改
- 如何修改Rails預設腳手架的模板AI
- PbootCMS修改後臺文章顯示最大數量boot
- CentOS7預設的快捷鍵如何修改設定CentOS
- Kali Linux修改桌面預設圖示Linux
- unity 分數的顯示Unity
- 如何在 Sway 中設定多個顯示器
- ubuntu修改預設系統啟動項Ubuntu
- Mongodb預設日誌的清理!MongoDB
- redis裡顯示key大小的shell指令碼Redis指令碼
- 修改資料庫的日期顯示格式資料庫
- 如何在Mac上的一個“預覽”視窗中顯示若干檔案呢?Mac
- word2013設定顯示修改痕跡的方法
- 手動設定和修改X-Window的顯示模式(轉)模式
- 如何修改meclipse中的預設瀏覽器Eclipse瀏覽器
- CSS實現限制顯示的字數,超出顯示"..."CSS
- 寶塔如何修改預設頁
- 設定SAP標準報表顯示介面預設值的方式
- HANA Studio中修改預設查詢結果只顯示1000行
- shell中如何處理兩個數的減法
- 在本地修改預設啟動的資料庫例項名資料庫
- 預設角色的設定和修改