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

查看:16
本文介绍了了解 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天全站免登陆