Skip to content

Commit ee1584a

Browse files
committed
update troubleshooting query doc
1 parent 6c57af5 commit ee1584a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/cosmos-db/troubleshoot-query-performance.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.reviewer: sngun
1111
---
1212
# Troubleshoot query issues when using Azure Cosmos DB
1313

14-
This article walks through a general recommended approach for troubleshooting queries in Azure Cosmos DB. While the steps outlined in this document should not be considered a “catch all” for potential query issues, we have included the most common performance tips here. You should use this document as a starting place for troubleshooting slow or expensive queries in Azure Cosmos DB’s core (SQL) API. You use [diagnostics logs](cosmosdb-monitor-resource-logs.md) to identify queries that are slow or consume significant amounts of throughput.
14+
This article walks through a general recommended approach for troubleshooting queries in Azure Cosmos DB. While the steps outlined in this document should not be considered a “catch all” for potential query issues, we have included the most common performance tips here. You should use this document as a starting place for troubleshooting slow or expensive queries in Azure Cosmos DB’s core (SQL) API. You can also use [diagnostics logs](cosmosdb-monitor-resource-logs.md) to identify queries that are slow or consume significant amounts of throughput.
1515

1616
You can broadly categorize query optimizations in Azure Cosmos DB: Optimizations that reduce the Request Unit (RU) charge of the query and optimizations that just reduce latency. By reducing the RU charge of a query, you will almost certainly decrease latency as well.
1717

@@ -127,11 +127,15 @@ Indexing policy:
127127
{
128128
"indexingMode": "consistent",
129129
"automatic": true,
130-
"includedPaths": [],
131-
"excludedPaths": [
130+
"includedPaths": [
132131
{
133132
"path": "/*"
134133
}
134+
],
135+
"excludedPaths": [
136+
{
137+
"path": "/description/*"
138+
}
135139
]
136140
}
137141
```
@@ -147,15 +151,11 @@ Updated indexing policy:
147151
"indexingMode": "consistent",
148152
"automatic": true,
149153
"includedPaths": [
150-
{
151-
"path": "/description/*"
152-
}
153-
],
154-
"excludedPaths": [
155154
{
156155
"path": "/*"
157156
}
158-
]
157+
],
158+
"excludedPaths": []
159159
}
160160
```
161161

@@ -406,7 +406,7 @@ Queries that are run from a different region than the Azure Cosmos DB account wi
406406
407407
## Increasing provisioned throughput
408408
409-
In Azure Cosmos DB, your provisioned throughput is measured in Request Units (RU’s). Let’s imagine you have a query that consumes 5 RU’s of throughput. For example, if you provision 1,000 RU’s, you would be able to run that query 200 times per second. If you attempted to run the query when there was not enough throughput available, Azure Cosmos DB would return an HTTP 429 error. Any of the current Core (SQL) API sdk's will automatically retry this query after waiting a brief period. Throttled requests take a longer amount of time, so increasing provisioned throughput can improve query latency. You can observe the [total number of requests throttled requests](use-metrics.md#understand-how-many-requests-are-succeeding-or-causing-errors.md) in the Metrics blade of the Azure portal.
409+
In Azure Cosmos DB, your provisioned throughput is measured in Request Units (RU’s). Let’s imagine you have a query that consumes 5 RU’s of throughput. For example, if you provision 1,000 RU’s, you would be able to run that query 200 times per second. If you attempted to run the query when there was not enough throughput available, Azure Cosmos DB would return an HTTP 429 error. Any of the current Core (SQL) API sdk's will automatically retry this query after waiting a brief period. Throttled requests take a longer amount of time, so increasing provisioned throughput can improve query latency. You can observe the [total number of requests throttled requests](use-metrics.md#understand-how-many-requests-are-succeeding-or-causing-errors) in the Metrics blade of the Azure portal.
410410
411411
## Increasing MaxConcurrency
412412

0 commit comments

Comments
 (0)