您可以访问分区大小的数据吗? [英] Can you access the data for partition sizes?

查看:67
本文介绍了您可以访问分区大小的数据吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为为我的数据库设置的分区键是正确的,但是我的公司希望在未来几年内进行大规模扩展,我想提交一个过程,如果其中一个分区超过5GB。然后我们可以看看
在我们达到10gb限制之前更改分区密钥进行判断调用。

I believe that the partition key that is set up for my databases are correct but my company are looking to scale heavily over the next few years and I want to put in a process that will notify me if one of the partitions exceeds 5gb. We can then look to make a judgement call on changing the partition key before we reach the 10gb limit.

我知道通过指标>存储选项卡,我可以看到分区的图形界面,但我们在许多数据库中有30-40个集合。我不想定期搜索这些内容,因为它需要花费

I know that by going through the metrics > storage tabs that I can see a graphical interface of partitions but we have 30-40 collections across a number of databases. I don't want to be manualy search over these at regular intervals because of the time it will take.

我尝试过Powershell Azure,Rest API并设置警报但似乎没有任何东西能够提供我跟踪的分区数据大小。 

I have tried Powershell Azure, Rest API and just setting up alerts but nothing seems to be able to serve up the partition data size for me to track. 

我希望能够通过顶部分区键跟踪数据+索引存储消耗(在我可以通过自动方式报告和提醒的方式。

I want to be able to track Data + Index storage consume by top partition keys (found in metrics) in a way that I can report and alert on in an automated fashion.

我假设可能有跨数据库运行大量查询的方法但是假设运行成本很高每月/每季度。

I assume there may be way of running a massive query across databases but assume that will be expensive to run even on a monthly/quarterly basis.




< svg aria-hidden =" true" focusable =" false" height =" 100%" role =" presentation" width =" 100%"><使用
href =" #FxSymbol0-047">< svg class ="" focusable =" false" height =" 100%" id =" FxSymbol0-047" role =" ; presentation" viewBox =" -795 996 9 9" width =" 100%" xmlns:svg =" http://www.w3.org/2000/svg"
xmlns:xlink =" ; http://www.w3.org/1999/xlink">< g>< path d =" M-790.5 996c-2.5 0-4.5 2-4.5 4.5s2 4.5 4.5 4.5 4.5-2 4.5- 4.5-2-4.5-4.5-4.5zm.7 7.5h-1.5v-3.6h1.5v3.6zm-.7-4.4c-.5 0-.8-.4-.8-.8s.4-。 8.8-.8.8.4.8.8-.3.8-.8.8z">< / path>< / g>< / svg>< / use>< / svg>

推荐答案

您可以使用REST API或.NET SDK来获取集合大小。

You can use the REST API or the .NET SDK to get the collection size.

请参阅此< a href ="https://docs.microsoft.com/en-us/azure/cosmos-db/moni tor-accounts#monitor-azure-cosmos-db-programmingmatically">
链接 了解更多信息。

Please refer to this link for more information.

如果您需要帮助,请告诉我们。还有其他任何问题。

Do let us know if you need help or have any further questions.


_


如果上述答案有用,请点击"标记为答案"或"向上投票",这可能对其他社区
成员阅读此主题有益。
 


这篇关于您可以访问分区大小的数据吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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