-
Notifications
You must be signed in to change notification settings - Fork 533
Query Design and Tips
j82w edited this page Feb 4, 2020
·
9 revisions
- Provides the ability to parse and optimize the query locally
- Local query parsing avoids network call which reduces latency
- Only supported on Windows x64
Strong recommend to read how Cosmos DB horizontally scales.
- Does not get impacted by container scaling
- Can be done by restricting the partition key in the SQL query by using something like a where clause or the partition key can be passed via the request options
- SDK visits every physical partition in Cosmos DB and run the query against that physical partition.
- Depending on the query the SDK may have to aggregate result locally. For example a distinct query would get a distinct list from each partition but has to remove duplicates between partitions.
- Impacted by container scaling. The larger the container the more physical partitions it will contain.