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: support/azure/synapse-analytics/dedicated-sql/query-execution-performance/troubleshoot-dsql-perf-slow-query.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,15 @@ Follow the steps to troubleshoot the issue or execute the steps in the notebook
> To save troubleshooting time, make sure that the statistics are [created and up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics) and [rebuild clustered columnstore indexes in the dedicated SQL pool](dsql-perf-cci-health.md).
31
+
> To save troubleshooting time, make sure that the statistics are [created and up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics), and [rebuild clustered columnstore indexes in the dedicated SQL pool](dsql-perf-cci-health.md).
## Step 1: Identify the request_id (also known as QID)
36
36
37
37
The `request_id` of the slow query is required to research potential reasons for a slow query. Use the following script as a starting point for identifying the query you want to troubleshoot. Once the slow query is identified, note down the `request_id` value.
38
38
39
-
First, monitor active queries. This query is ordered by newest rows first.
39
+
First, monitor the active queries. This query is ordered by the newest rows first.
40
40
41
41
```sql
42
42
-- Monitor active queries
@@ -328,7 +328,7 @@ Have your statistics up-to-date to ensure that the query optimizer generates an
328
328
329
329
**Mitigations**
330
330
331
-
First, [checkstatistics accuracy on a dedicated SQL pool](dsql-perf-stats-accuracy.md). If necessary, [create orupdate statistics](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics).
331
+
First, [checkthe accuracy of the statistics on a dedicated SQL pool](dsql-perf-stats-accuracy.md). If necessary, [create orupdate the statistics](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics).
332
332
333
333
<br/>
334
334
</details>
@@ -383,7 +383,7 @@ In-flight data skew is a variant of the [data skew (stored)](#data-skew-stored)
383
383
384
384
**Mitigations**
385
385
386
-
- Ensure that statistics are [created and up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics). You can verify the accuracy of statistics by following the steps outlined in [Check statistics accuracy on a dedicated SQL pool](dsql-perf-stats-accuracy.md).
386
+
- Ensure that statistics are [created and up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics). You can verify their accuracy by following the steps outlined in [Check statistics accuracy on a dedicated SQL pool](dsql-perf-stats-accuracy.md).
387
387
- Change the order of your `GROUP BY` columns to lead with a higher-cardinality column.
388
388
- Create multi-column statistics if joins cover multiple columns.
389
389
- Add query hint `OPTION(FORCE_ORDER)` to your query.
@@ -452,9 +452,9 @@ Outdated statistics can cause the generation of an unoptimized distributed plan,
452
452
453
453
The optimizer relies on statistics to estimate the number of rows that will be returned by a query. Statistics allow the query optimizer to choose the most efficient plan or perform the best move operation (for example, a Shuffle Move Operation or Broad Cast Move Operation) to align the data during the join condition. The best join condition depends on the table distribution type.
454
454
455
-
For example, if the actual number of rows for a given table is 60 million and the estimated number of rows is 1,000 (at control node level), the optimizer might choose a Broadcast move operation. This behavior is because the cost is perceived to be lower compared to a Shuffle Move, given the optimizer's assumption that the table contains only 1,000 rows. However, once the actual execution begins, the engine will move 60 million rows as part of the execution using a Broadcast move, which can be an expensive operation considering both the data size and row count. Consequently, if the data size is substantial, it might lead to performance issues for the query itself and other queries, resulting in high CPU usage.
455
+
For example, if the actual number of rows for a given table is 60 million and the estimated number of rows is 1,000 (at the control node level), the optimizer might choose a Broadcast move operation. This behavior is because the cost is perceived to be lower compared to a Shuffle Move, given the optimizer's assumption that the table contains only 1,000 rows. However, once the actual execution begins, the engine will move 60 million rows as part of the execution using a Broadcast move, which can be an expensive operation considering both the data size and row count. Consequently, if the data size is substantial, it might lead to performance issues for the query itself and other queries, resulting in high CPU usage.
456
456
457
-
To remedy this situation, ensure all [statistics are up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics), and a maintenance plan is in place to keep them updated for user workloads. You can verify the accuracy of statistics by following the steps outlined in [Check statistics accuracy on a dedicated SQL pool](dsql-perf-stats-accuracy.md).
457
+
To remedy this situation, ensure all [statistics are up-to-date](/azure/synapse-analytics/sql/develop-tables-statistics#update-statistics) and a maintenance plan is in place to keep them updated for user workloads. You can verify the accuracy of the statistics by following the steps outlined in [Check statistics accuracy on a dedicated SQL pool](dsql-perf-stats-accuracy.md).
0 commit comments