了解 DocumentDB 响应标头中的 x-ms-resource-usage [英] Understanding the x-ms-resource-usage in DocumentDB response header
问题描述
在通过 Id 执行简单的 Get 操作时,返回单个文档(不是带有一个文档的数组),我得到以下 x-ms-resource-usage:
While performing a simple Get operation by Id where a single document is returned (not an array with one document) I get the following x-ms-resource-usage:
x-ms-resource-usage:documentSize:0;documentsSize:288;collectionSize=307;
问题:
- 为什么
documentSize
为 0? - 计量单位是什么?字节?
documentSize
和documentsSize
有什么区别?请注意,查询只返回一个文档.- 什么是
collectionSize
?这是集合中的文档总数吗? x-ms-resource-usage
和x-ms-resource-quota
有什么区别?
- Why is
documentSize
0? - What is the unit of measure? Bytes?
- What is the difference between
documentSize
anddocumentsSize
? Please note the query only returns one document. - What is the
collectionSize
? Is that the total number of documents in the collection? - What is the difference between
x-ms-resource-usage
andx-ms-resource-quota
?
推荐答案
我很确定数字如下,并且全部以 KB 为单位:
I'm fairly sure the numbers are as follows, and all in KB:
documentSize
:文档的大小documentsSize
:集合中所有文档的总大小collectionSize
:集合中所有文档的总大小,以及索引等开销
documentSize
: Size of the documentdocumentsSize
: Combined size of all documents in collectioncollectionSize
: Combined size of all documents in collection, along with overhead such as indexes
x-ms-resource-usage
是关于集合中消耗的资源,而 x-ms-resource-quota
会给你你的限制.因此,使用配额时,您会看到 documentsSize
和 collectionSize
都设置为 10485760,即 10GB (10,485,760 MB).
x-ms-resource-usage
is about consumed resources within the collection, while x-ms-resource-quota
is going to give you your limits. So with quota, you'll see documentsSize
and collectionSize
both set to something like 10485760, which is 10GB (10,485,760 MB).
这篇关于了解 DocumentDB 响应标头中的 x-ms-resource-usage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!