When fetching all documents from Cosmos Db by a set of IDs, results are limited by max degree of parallelism?

ScottLee 21 Reputation points

I've read below link, but I wasn't clear if query results are limited by max degree of parallelism.

I have collection with partition key /id, and I am trying to fetch documents by ids.

I am fetching documents by ids using javascript SDK like below

const joinedIds = "'" + ids.join("','") + "'";
const statement = SELECT * FROM c WHERE c.id IN (${joinedIds});

and my database settings are the followings

  • Page Options: unlimited
  • Enable cross-partition query: enabled
  • Max degree of parallelism: 6

My question is

If documents are distributed in more than 6 partitions,

Will fetchAll return all documents regardless of max degree of parallelism or number of result is limited by max degree of parallelism which is set to 6?

What is maximum value for maxDegreeOfParallelism?

Thanks in advance

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,528 questions
{count} votes

Accepted answer
  1. Sajeetharan 2,031 Reputation points Microsoft Employee

    When you use FetchAll, it fetches all documents in a container and it's not limited by MaxDegreeOfParallelism. There is no limit as such , this is a client side parallelism and it would cost your CPU / Memory resources that you have on your site.

0 additional answers

Sort by: Most helpful