了解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屋!