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.
When fetching all documents from Cosmos Db by a set of IDs, results are limited by max degree of parallelism?
I've read below link, but I wasn't clear if query results are limited by max degree of parallelism.
https://learn.microsoft.com/en-us/answers/questions/129094/how-to-retrieve-a-set-of-documents-from-cosmos-db.html
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});
container.items.query(statement).fetchAll()
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
-
Sajeetharan 2,261 Reputation points Microsoft Employee2022-06-02T10:56:11.76+00:00