Reputation: 15211
Lets assume:
Question: Does the exact same query cost the same if there are 10,000 or 10,000,000 of documents within the container in other logical partitions that are not touched by the query?
Upvotes: 1
Views: 139
Reputation: 8763
It depends. Generally speaking if your queries are properly utilizing the indexes the query should cost the same regardless of how much data there is in the container (assuming single partition query).
However, if your query performs a full scan on the data then the more data in the container, the more expensive the query for the same amount of results returned. You can learn more here in this Index Usage article.
You can now get metrics on whether you are using the right indexes in Cosmos DB in your queries. To learn more on how to enable and use these see, Indexing metrics in Azure Cosmos DB
Upvotes: 2