问题描述
我有一个共享吞吐量为 400 的数据库.该数据库包含两个容器.
I have a database with a shared Throughput of 400. This database contains two containers.
当我在其中一个容器上运行以下查询时,我需要为 1183 RU付费:
When I run the following query on one of these containers, I get charged for 1183 RUs :
SELECT VALUE COUNT(1) FROM c where c.GroupClaim = 'None'
GroupClaim
是容器的分区键.
当我将吞吐量设置为400时,如何不拒绝/限制1183 RU查询?
How can a 1183 RUs query do not get rejected/throttled when I have a Throughput set to 400 ?
这是我的查询统计信息的屏幕:
Here is a screen of my query stats :
推荐答案
我无法解释为什么查询成本如此之高,但是...如果您运行的查询超出预订的RU/秒,Cosmos DB将完成查询.但是现在您将负债累累",并且您将受到限制,直到还清债务为止.
I can't explain why your query costs so much but... if you run a query that exceeds subscribed RU/sec, Cosmos DB will complete the query. But now you'll be "in debt" and you'll be throttled until your debt is paid off.
在您的情况下,您比400多出700多(您的债务),因此您会看到节流时间介于2到3秒之间(因为在3到3分钟内您将有1200 RU第二阶段,具体取决于您的服务层).
In your case, you're over the 400 by just over 700 (your debt), so you'll see the throttle time period be somewhere between 2 and 3 seconds (since you would have 1200 RU available over a 3-second period, per your service tier).
这篇关于为什么超过RU吞吐量的我的CosmosDB Count操作不会停止运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!