You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/troubleshoot-query-performance.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.reviewer: sngun
11
11
---
12
12
# Troubleshoot query issues when using Azure Cosmos DB
13
13
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.
15
15
16
16
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.
17
17
@@ -127,11 +127,15 @@ Indexing policy:
127
127
{
128
128
"indexingMode": "consistent",
129
129
"automatic": true,
130
-
"includedPaths": [],
131
-
"excludedPaths": [
130
+
"includedPaths": [
132
131
{
133
132
"path": "/*"
134
133
}
134
+
],
135
+
"excludedPaths": [
136
+
{
137
+
"path": "/description/*"
138
+
}
135
139
]
136
140
}
137
141
```
@@ -147,15 +151,11 @@ Updated indexing policy:
147
151
"indexingMode": "consistent",
148
152
"automatic": true,
149
153
"includedPaths": [
150
-
{
151
-
"path": "/description/*"
152
-
}
153
-
],
154
-
"excludedPaths": [
155
154
{
156
155
"path": "/*"
157
156
}
158
-
]
157
+
],
158
+
"excludedPaths": []
159
159
}
160
160
```
161
161
@@ -406,7 +406,7 @@ Queries that are run from a different region than the Azure Cosmos DB account wi
406
406
407
407
## Increasing provisioned throughput
408
408
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.
0 commit comments