3
votes

I am writing a Cosmos DB stored procedure which has multiple Queries inside it. I want to know the number of RU's consumed when the Stored Procedure Executes.Once the Stored Procedure is executed there is no log of number of RU's consumed,which appears when Query is executed.

Is there any method by which I can view the RU's consumed for executing the Stored Procedure ?

1
How do you execute the stored procedure? Are you using the .NET SDK?Nick Chapsas
I am currently executing the stored procedures through portal any way to get it through the portal ?programmerP

1 Answers

2
votes

As I know,If you want get RUs of executeStoredProcedure method in Cosmos DB SDK, please use getRequestCharge() method. It won't show in the portal.

Such as code:

StoredProcedureResponse resourceResponse = documentClient.executeStoredProcedure("dbs/db/colls/item/sprocs/b",requestOptions ,null);
System.out.println(resourceResponse.getRequestCharge());

If you want to get request charge of internal SQL in stored procedure.It can't be done so far.You could see this previous thread.

This is not available today with Azure Cosmos DB. The ['x-ms-request-charge'] value will be in the range of the RUs consumed by the individual operations performed outside the stored procedure.

If you do concern this feature, you could submit feedback here to trace the progress.

Hope it helps you.