Skip to content

Commit 3067183

Browse files
committed
minor updates
1 parent ed0004c commit 3067183

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

support/azure/synapse-analytics/dedicated-sql/query-execution-performance/dsql-perf-common-query-errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: Troubleshoot Common Query Execution Errors on an Azure Synapse Dedicated
33
description: Provides a reference of the most common errors and recommendations for query execution on an Azure Synapse dedicated SQL pool.
44
author: dialmoth
55
ms.author: dialmoth
6-
ms.reviewer: goventur, wiassaf
7-
ms.date: 01/30/2025
6+
ms.reviewer: goventur, wiassaf, dialmoth
7+
ms.date: 02/05/2025
88
ms.custom:
9-
- "sap:Query Execution and Performance"
9+
- sap:Query Execution and Performance
1010
---
1111

1212
# Troubleshoot common query errors

support/azure/synapse-analytics/dedicated-sql/query-execution-performance/troubleshoot-dsql-perf-slow-query.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: Troubleshoot Slow Queries on a Dedicated SQL Pool
33
description: Describes the troubleshooting steps and mitigations for the common performance issues of queries run on an Azure Synapse Analytics dedicated SQL pool.
44
author: dialmoth
55
ms.author: dialmoth
6-
ms.reviewer: goventur, wiassaf
7-
ms.date: 01/30/2025
6+
ms.reviewer: goventur, wiassaf, dialmoth
7+
ms.date: 02/05/2025
88
ms.custom:
9-
- "sap:Query Execution and Performance"
9+
- sap:Query Execution and Performance
1010
---
1111

12-
# Troubleshoot a slow query on a dedicated SQL Pool
12+
# Troubleshoot a slow query on a dedicated SQL pool
1313

1414
_Applies to:_   Azure Synapse Analytics
1515

@@ -28,7 +28,7 @@ Follow the steps to troubleshoot the issue or execute the steps in the notebook
2828
> - Outdated statistics
2929
> - Unhealthy clustered columnstore indexes (CCIs)
3030
>
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).
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).
3232
3333
<a id="step-1-identify-the-request_id-aka-qid"></a>
3434

@@ -66,12 +66,12 @@ To better target the slow queries, use the following tips when you run the scrip
6666

6767
## Step 2: Determine where the query is taking time
6868

69-
Run the following script to find the step that might cause the performance issue of the query. Update the variables in the script with the values described in the following table. Change the `@ShowActiveOnly` value to 0 to get the full picture of the distributed plan. Take note of the `StepIndex`, `Phase`, and `Description` values of the slow step identified from the result set.
69+
Run the following script to find the step that might cause the performance issue of the query. Update the variables in the script with the values described in the following table. Change the `@ShowActiveOnly` value to `0` to get the full picture of the distributed plan. Take note of the `StepIndex`, `Phase`, and `Description` values of the slow step identified from the result set.
7070

7171
| Parameter | Description |
7272
| --- | ---- |
73-
| `@QID` | The `request_id` value obtained in [Step 1](#step-1-identify-the-request_id-aka-qid) |
74-
| `@ShowActiveOnly` | `0` - Show all steps for the query<br/>`1` - Show only the currently active step |
73+
| `@QID` | The `request_id` value is obtained in [Step 1](#step-1-identify-the-request_id-aka-qid). |
74+
| `@ShowActiveOnly` | Setting the value to `0` shows all steps for the query.<br/>Setting the value to `1` shows only the currently active step. |
7575

7676
```sql
7777
DECLARE @QID AS VARCHAR (16) = '<request_id>', @ShowActiveOnly AS BIT = 1;
@@ -145,13 +145,13 @@ ORDER BY StepIndex;
145145

146146
## Step 3: Review step details
147147

148-
Run the following script to review the details of the step identified in the previous step. Update the variables in the script with the values described in the following table. Change the `@ShowActiveOnly` value to 0 to compare all distribution timings. Take note of the `wait_type` value for the distribution that might cause the performance issue.
148+
Run the following script to review the details of the step identified in the previous step. Update the variables in the script with the values described in the following table. Change the `@ShowActiveOnly` value to `0` to compare all distribution timings. Take note of the `wait_type` value for the distribution that might cause the performance issue.
149149

150150
| Parameter | Description |
151151
| -- | ---- |
152-
| `@QID` | The `request_id` value obtained in [Step 1](#step-1-identify-the-request_id-aka-qid) |
153-
| `@StepIndex` | The `StepIndex` value identified in [Step 2](#step-2-determine-where-the-query-is-taking-time) |
154-
| `@ShowActiveOnly` | `0` - Show all distributions for the given `StepIndex` value<br/>`1` - Show only the currently active distributions for the given `StepIndex` value |
152+
| `@QID` | The `request_id` value is obtained in [Step 1](#step-1-identify-the-request_id-aka-qid). |
153+
| `@StepIndex` | The `StepIndex` value is identified in [Step 2](#step-2-determine-where-the-query-is-taking-time). |
154+
| `@ShowActiveOnly` | Setting the value to `0` shows all distributions for the given `StepIndex` value.<br/>Setting the value to `1` shows only the currently active distributions for the given `StepIndex` value. |
155155

156156
```sql
157157
DECLARE @QID VARCHAR(16) = '<request_id>', @StepIndex INT = <StepIndex>, @ShowActiveOnly BIT = 1;
@@ -450,9 +450,9 @@ Unhealthy CCIs contribute to increased IO, CPU, and memory allocation, which, in
450450
451451
Outdated statistics can cause the generation of an unoptimized distributed plan, which involves more data movement than necessary. Unnecessary data movement increases the workload not only on your data at rest but also on the `tempdb`. Because IO is a shared resource across all queries, performance impacts can be felt by the entire workload.
452452
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 the best move operation to perform (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.
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.
454454
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 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 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.
456456

457457
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).
458458

0 commit comments

Comments
 (0)