Why server-less CosmosDB is too much slow when we update the indices?

Jithin M V 96 Reputation points

I have migrated all my databases to CosmosDB with Mongo API by removing indices. After the migration, I started creating indices manually on CosmosDB. I have a collection called to order. It has 7 Million documents each document is nearly 1 KB in size. But as I update the index it is taking a lot of time. I am checking the index update status. It is been 30 minutes still the update is only 40 % complete. Is this index update is a lot of RU consuming operation.? I know we have a limitation of 5000 RU/s per container. So is this slowness is because of that. If someone knows the answer to this please help me. And also, will the Azure cost me for the RU's that I consume during an index update. I have read somewhere that it won't.

Azure Database Migration service
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,365 questions
0 comments No comments
{count} votes

Accepted answer
  1. Oury Ba-MSFT 15,196 Reputation points Microsoft Employee

    Hi @Jithin M V Thank you for posting your Question on Microsoft Q&A.

    When you start the indexing change, we’ll use all of your available throughput to do the indexing transformation. In this case, because it’s a serverless container, we will use up to 5,000 RU/s (since serverless containers can consume up to 5,000 RUs per second). At this time, we do not charge for those RUs but we’ll never use more than 5,000 RU/s total (combining CRUD and queries and indexing transformation).

    Please let me know if that help


0 additional answers

Sort by: Most helpful