了解DocumentDB响应标头中的x-ms-resource-usage [英] Understanding the x-ms-resource-usage in DocumentDB response header

查看:82
本文介绍了了解DocumentDB响应标头中的x-ms-resource-usage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在通过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?
  • 度量单位是什么?字节?
  • documentSizedocumentsSize有什么区别?请注意,查询仅返回一个文档.
  • 什么是collectionSize?那是馆藏中的文件总数吗?
  • x-ms-resource-usagex-ms-resource-quota有什么区别?
  • Why is documentSize 0?
  • What is the unit of measure? Bytes?
  • What is the difference between documentSize and documentsSize? 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 and x-ms-resource-quota?

推荐答案

我相当确定这些数字如下,并且全部以KB为单位:

I'm fairly sure the numbers are as follows, and all in KB:

  • documentSize:文档的大小
  • documentsSize:集合中所有文档的合并大小
  • collectionSize:集合中所有文档的总大小以及索引之类的开销
  • documentSize: Size of the document
  • documentsSize: Combined size of all documents in collection
  • collectionSize: Combined size of all documents in collection, along with overhead such as indexes

x-ms-resource-usage与集合中消耗的资源有关,而x-ms-resource-quota将为您提供限制.因此,有了配额,您会看到documentsSizecollectionSize都设置为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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆