gpt4 book ai didi

mongodb - MongoDB 中聚合命令中的默认批处理大小

转载 作者:行者123 更新时间:2023-12-04 01:28:39 25 4
gpt4 key购买 nike

来自 aggregate command doucumentation` :

To indicate a cursor with the default batch size, specify cursor: {}.



但是,我还没有找到这种默认值的值或如何找到它(可能使用 mongo 管理命令)。

如何找到这样的值(value)?

最佳答案

来自 the docs :

The MongoDB server returns the query results in batches. The amount of data in the batch will not exceed the maximum BSON document size.

New in version 3.4: Operations of type find(), aggregate(), listIndexes, and listCollections return a maximum of 16 megabytes per batch. batchSize() can enforce a smaller limit, but not a larger one.

find() and aggregate() operations have an initial batch size of 101 documents by default. Subsequent getMore operations issued against the resulting cursor have no default batch size, so they are limited only by the 16 megabyte message size.


因此,第一批的默认值为 101 个文档,后续批大小为 getMore()调用未确定,但不能超过 16 兆字节。

关于mongodb - MongoDB 中聚合命令中的默认批处理大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52057720/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com