Why my CosmosDB Count operation that exceeeds RU Throughput does not throttle?

≡放荡痞女 提交于 2020-12-04 07:09:57

问题


I have a database with a shared Throughput of 400. This database contains two containers.

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 is the partition key of the container.

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 :


回答1:


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.

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).



来源:https://stackoverflow.com/questions/56391573/why-my-cosmosdb-count-operation-that-exceeeds-ru-throughput-does-not-throttle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!