diff --git a/src/current/_includes/v24.3/ui/statement-details.md b/src/current/_includes/v24.3/ui/statement-details.md index f8d07a2ba93..25db078d7b0 100644 --- a/src/current/_includes/v24.3/ui/statement-details.md +++ b/src/current/_includes/v24.3/ui/statement-details.md @@ -75,6 +75,16 @@ The following screenshot shows an execution of the query discussed in [Overview] Plan table +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for troubleshooting query plan regressions. + +Plan distribution over time graph + +#### Plan table + The plan table shows the following details: Column | Description diff --git a/src/current/_includes/v25.2/ui/statement-details.md b/src/current/_includes/v25.2/ui/statement-details.md index 4c846eed9fa..c46cbed3dd5 100644 --- a/src/current/_includes/v25.2/ui/statement-details.md +++ b/src/current/_includes/v25.2/ui/statement-details.md @@ -35,7 +35,7 @@ The **Overview** section also displays the SQL statement fingerprint statistics The following screenshot shows the statement fingerprint of the query described in [Use the right index]({{ link_prefix }}apply-statement-performance-rules.html#rule-2-use-the-right-index): -Statement fingerprint overview +Statement fingerprint overview #### Insights @@ -47,7 +47,7 @@ The **Insights** table is displayed when CockroachDB has detected a problem with The following screenshot shows the insights of the statement fingerprint illustrated in [Overview](#overview): -Statement fingerprint overview +Statement fingerprint overview #### Charts @@ -65,7 +65,7 @@ Charts following the execution attributes display statement fingerprint statisti The following charts summarize the executions of the statement fingerprint illustrated in [Overview](#overview): -Statement fingerprint charts +Statement fingerprint charts ### Explain Plans @@ -73,7 +73,17 @@ The **Explain Plans** tab displays statement plans for an [explainable statement The following screenshot shows an execution of the query discussed in [Overview](#overview): -Plan table +Plan table + +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for troubleshooting query plan regressions. + +Plan distribution over time graph + +#### Plan table The plan table shows the following details: @@ -94,7 +104,7 @@ Vectorized | Whether the execution used the [vectorized execution engine]({{ lin To display the plan that was executed, click the plan gist. For the plan gist `AgHUAQIABQAAAAHYAQIAiA...`, the following plan displays: -Plan table +Plan table #### Insights @@ -102,7 +112,7 @@ The plan table displays the number of insights related to the plan. If a plan ha The following screenshot shows 1 insight found after running the query discussed in [Overview](#overview) 6 or more times: -Plan with insight +Plan with insight {{site.data.alerts.callout_info}} CockroachDB uses the threshold of 6 executions before offering an insight because it assumes that you are no longer merely experimenting with a query at that point. @@ -114,7 +124,7 @@ If you click **Create Index**, a confirmation dialog displays a warning about th If you click **Apply** to create the index and then execute the statement again, the **Explain Plans** tab will show that the second execution (in this case at `19:40`), which uses the index and has no insight, takes less time than the first 6 executions. -Plan table after index +Plan table after index ### Diagnostics @@ -134,7 +144,7 @@ Diagnostics will be collected a maximum of *N* times for a given activated finge #### Activate diagnostics collection and download bundles -Activate statement diagnostics +Activate statement diagnostics {{site.data.alerts.callout_danger}} Collecting diagnostics has an impact on performance. All executions of the statement fingerprint will run slower until diagnostics are collected. @@ -156,11 +166,11 @@ To activate diagnostics collection: When the statement fingerprint is executed according to the statement diagnostic options selected, a row with the activation time and collection status is added to the **Statement diagnostics** table. -Statement diagnostics table +Statement diagnostics table The collection status values are: -- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click Down arrow **Bundle (.zip)**. +- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click Down arrow **Bundle (.zip)**. - **WAITING**: indicates that a SQL statement matching the fingerprint has not yet been recorded. To cancel diagnostics collection, click the **Cancel request** button. - **ERROR**: indicates that the attempt at diagnostics collection failed. @@ -173,4 +183,4 @@ Although fingerprints are periodically cleared from the Statements page, all dia - Click **Advanced Debug** in the left-hand navigation and click [Statement Diagnostics History]({% link {{ page.version.version }}/ui-debug-pages.md %}#reports). {% endif %} -Click Down arrow **Bundle (.zip)** to download any diagnostics bundle. +Click Down arrow **Bundle (.zip)** to download any diagnostics bundle. diff --git a/src/current/_includes/v25.3/ui/statement-details.md b/src/current/_includes/v25.3/ui/statement-details.md index 4c846eed9fa..085cd46dda8 100644 --- a/src/current/_includes/v25.3/ui/statement-details.md +++ b/src/current/_includes/v25.3/ui/statement-details.md @@ -35,7 +35,7 @@ The **Overview** section also displays the SQL statement fingerprint statistics The following screenshot shows the statement fingerprint of the query described in [Use the right index]({{ link_prefix }}apply-statement-performance-rules.html#rule-2-use-the-right-index): -Statement fingerprint overview +Statement fingerprint overview #### Insights @@ -47,7 +47,7 @@ The **Insights** table is displayed when CockroachDB has detected a problem with The following screenshot shows the insights of the statement fingerprint illustrated in [Overview](#overview): -Statement fingerprint overview +Statement fingerprint overview #### Charts @@ -65,7 +65,7 @@ Charts following the execution attributes display statement fingerprint statisti The following charts summarize the executions of the statement fingerprint illustrated in [Overview](#overview): -Statement fingerprint charts +Statement fingerprint charts ### Explain Plans @@ -73,7 +73,17 @@ The **Explain Plans** tab displays statement plans for an [explainable statement The following screenshot shows an execution of the query discussed in [Overview](#overview): -Plan table +Plan table + +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for troubleshooting query plan regressions. + +Plan distribution over time graph + +#### Plan table The plan table shows the following details: @@ -94,7 +104,7 @@ Vectorized | Whether the execution used the [vectorized execution engine]({{ lin To display the plan that was executed, click the plan gist. For the plan gist `AgHUAQIABQAAAAHYAQIAiA...`, the following plan displays: -Plan table +Plan table #### Insights @@ -102,7 +112,7 @@ The plan table displays the number of insights related to the plan. If a plan ha The following screenshot shows 1 insight found after running the query discussed in [Overview](#overview) 6 or more times: -Plan with insight +Plan with insight {{site.data.alerts.callout_info}} CockroachDB uses the threshold of 6 executions before offering an insight because it assumes that you are no longer merely experimenting with a query at that point. @@ -114,7 +124,7 @@ If you click **Create Index**, a confirmation dialog displays a warning about th If you click **Apply** to create the index and then execute the statement again, the **Explain Plans** tab will show that the second execution (in this case at `19:40`), which uses the index and has no insight, takes less time than the first 6 executions. -Plan table after index +Plan table after index ### Diagnostics @@ -134,7 +144,7 @@ Diagnostics will be collected a maximum of *N* times for a given activated finge #### Activate diagnostics collection and download bundles -Activate statement diagnostics +Activate statement diagnostics {{site.data.alerts.callout_danger}} Collecting diagnostics has an impact on performance. All executions of the statement fingerprint will run slower until diagnostics are collected. @@ -156,11 +166,11 @@ To activate diagnostics collection: When the statement fingerprint is executed according to the statement diagnostic options selected, a row with the activation time and collection status is added to the **Statement diagnostics** table. -Statement diagnostics table +Statement diagnostics table The collection status values are: -- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click Down arrow **Bundle (.zip)**. +- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click Down arrow **Bundle (.zip)**. - **WAITING**: indicates that a SQL statement matching the fingerprint has not yet been recorded. To cancel diagnostics collection, click the **Cancel request** button. - **ERROR**: indicates that the attempt at diagnostics collection failed. @@ -173,4 +183,4 @@ Although fingerprints are periodically cleared from the Statements page, all dia - Click **Advanced Debug** in the left-hand navigation and click [Statement Diagnostics History]({% link {{ page.version.version }}/ui-debug-pages.md %}#reports). {% endif %} -Click Down arrow **Bundle (.zip)** to download any diagnostics bundle. +Click Down arrow **Bundle (.zip)** to download any diagnostics bundle. diff --git a/src/current/_includes/v25.4/ui/statement-details.md b/src/current/_includes/v25.4/ui/statement-details.md index a767c973f1b..dbf8540ad3e 100644 --- a/src/current/_includes/v25.4/ui/statement-details.md +++ b/src/current/_includes/v25.4/ui/statement-details.md @@ -75,6 +75,16 @@ The following screenshot shows an execution of the query discussed in [Overview] Plan table +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for [troubleshooting query plan regressions]({{ link_prefix }}troubleshoot-query-plan-regressions.html#multiple-valid-query-plans). + +Plan distribution over time graph + +#### Plan table + The plan table shows the following details: Column | Description diff --git a/src/current/_includes/v26.1/ui/statement-details.md b/src/current/_includes/v26.1/ui/statement-details.md index cda8ae94d81..33e700a379f 100644 --- a/src/current/_includes/v26.1/ui/statement-details.md +++ b/src/current/_includes/v26.1/ui/statement-details.md @@ -79,6 +79,16 @@ The following screenshot shows an execution of the query discussed in [Overview] Plan table +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for [troubleshooting query plan regressions]({{ link_prefix }}troubleshoot-query-plan-regressions.html#multiple-valid-query-plans). + +Plan distribution over time graph + +#### Plan table + The plan table shows the following details: Column | Description diff --git a/src/current/_includes/v26.2/ui/statement-details.md b/src/current/_includes/v26.2/ui/statement-details.md index 405fa6a38a9..95dab4c6b89 100644 --- a/src/current/_includes/v26.2/ui/statement-details.md +++ b/src/current/_includes/v26.2/ui/statement-details.md @@ -79,6 +79,16 @@ The following screenshot shows an execution of the query discussed in [Overview] Plan table +#### Plan Distribution Over Time + +The **Plan Distribution Over Time** graph displays the execution counts for every query plan used within the selected time interval. Each bar in the graph displays the total statement execution count for a given fifteen minute window within the selected interval. If multiple query plans were used in that window, the bar will be stacked, and each query plan will be represented by a different color. The key below the graph indicates the plan gist associated with each color. More information about these query plans can be found in the [plan table](#plan-table). + +This graph helps illustrate changes in the distribution of query plans chosen by the [cost-based optimizer]({{ link_prefix }}cost-based-optimizer.html) for this SQL statement. This can be useful for [troubleshooting query plan regressions]({{ link_prefix }}troubleshoot-query-plan-regressions.html#multiple-valid-query-plans). + +Plan distribution over time graph + +#### Plan table + The plan table shows the following details: Column | Description diff --git a/src/current/images/v24.3/plan_with_insight.png b/src/current/images/v24.3/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v24.3/plan_with_insight.png and b/src/current/images/v24.3/plan_with_insight.png differ diff --git a/src/current/images/v24.3/ui_plan_distribution_over_time.png b/src/current/images/v24.3/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v24.3/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v24.3/ui_plan_table.png b/src/current/images/v24.3/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v24.3/ui_plan_table.png and b/src/current/images/v24.3/ui_plan_table.png differ diff --git a/src/current/images/v24.3/ui_statement_plan_2.png b/src/current/images/v24.3/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v24.3/ui_statement_plan_2.png and b/src/current/images/v24.3/ui_statement_plan_2.png differ diff --git a/src/current/images/v25.2/plan_with_insight.png b/src/current/images/v25.2/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v25.2/plan_with_insight.png and b/src/current/images/v25.2/plan_with_insight.png differ diff --git a/src/current/images/v25.2/ui_plan_distribution_over_time.png b/src/current/images/v25.2/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v25.2/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v25.2/ui_plan_table.png b/src/current/images/v25.2/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v25.2/ui_plan_table.png and b/src/current/images/v25.2/ui_plan_table.png differ diff --git a/src/current/images/v25.2/ui_statement_plan_2.png b/src/current/images/v25.2/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v25.2/ui_statement_plan_2.png and b/src/current/images/v25.2/ui_statement_plan_2.png differ diff --git a/src/current/images/v25.3/plan_with_insight.png b/src/current/images/v25.3/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v25.3/plan_with_insight.png and b/src/current/images/v25.3/plan_with_insight.png differ diff --git a/src/current/images/v25.3/ui_plan_distribution_over_time.png b/src/current/images/v25.3/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v25.3/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v25.3/ui_plan_table.png b/src/current/images/v25.3/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v25.3/ui_plan_table.png and b/src/current/images/v25.3/ui_plan_table.png differ diff --git a/src/current/images/v25.3/ui_statement_plan_2.png b/src/current/images/v25.3/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v25.3/ui_statement_plan_2.png and b/src/current/images/v25.3/ui_statement_plan_2.png differ diff --git a/src/current/images/v25.4/plan_with_insight.png b/src/current/images/v25.4/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v25.4/plan_with_insight.png and b/src/current/images/v25.4/plan_with_insight.png differ diff --git a/src/current/images/v25.4/ui_plan_distribution_over_time.png b/src/current/images/v25.4/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v25.4/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v25.4/ui_plan_table.png b/src/current/images/v25.4/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v25.4/ui_plan_table.png and b/src/current/images/v25.4/ui_plan_table.png differ diff --git a/src/current/images/v25.4/ui_statement_plan_2.png b/src/current/images/v25.4/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v25.4/ui_statement_plan_2.png and b/src/current/images/v25.4/ui_statement_plan_2.png differ diff --git a/src/current/images/v26.1/plan_with_insight.png b/src/current/images/v26.1/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v26.1/plan_with_insight.png and b/src/current/images/v26.1/plan_with_insight.png differ diff --git a/src/current/images/v26.1/ui_plan_distribution_over_time.png b/src/current/images/v26.1/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v26.1/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v26.1/ui_plan_table.png b/src/current/images/v26.1/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v26.1/ui_plan_table.png and b/src/current/images/v26.1/ui_plan_table.png differ diff --git a/src/current/images/v26.1/ui_statement_plan_2.png b/src/current/images/v26.1/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v26.1/ui_statement_plan_2.png and b/src/current/images/v26.1/ui_statement_plan_2.png differ diff --git a/src/current/images/v26.2/plan_with_insight.png b/src/current/images/v26.2/plan_with_insight.png index 2b2616e8dad..8ca70929212 100644 Binary files a/src/current/images/v26.2/plan_with_insight.png and b/src/current/images/v26.2/plan_with_insight.png differ diff --git a/src/current/images/v26.2/ui_plan_distribution_over_time.png b/src/current/images/v26.2/ui_plan_distribution_over_time.png new file mode 100644 index 00000000000..4a5fefadf15 Binary files /dev/null and b/src/current/images/v26.2/ui_plan_distribution_over_time.png differ diff --git a/src/current/images/v26.2/ui_plan_table.png b/src/current/images/v26.2/ui_plan_table.png index 6fccc74f12b..58ef974842a 100644 Binary files a/src/current/images/v26.2/ui_plan_table.png and b/src/current/images/v26.2/ui_plan_table.png differ diff --git a/src/current/images/v26.2/ui_statement_plan_2.png b/src/current/images/v26.2/ui_statement_plan_2.png index e2afe936492..b9e24387f06 100644 Binary files a/src/current/images/v26.2/ui_statement_plan_2.png and b/src/current/images/v26.2/ui_statement_plan_2.png differ diff --git a/src/current/v25.4/troubleshoot-query-plan-regressions.md b/src/current/v25.4/troubleshoot-query-plan-regressions.md index a7b7a4ff51c..22d16346850 100644 --- a/src/current/v25.4/troubleshoot-query-plan-regressions.md +++ b/src/current/v25.4/troubleshoot-query-plan-regressions.md @@ -90,9 +90,9 @@ If the newer plan differs from the older plan, the query plan has changed: If multiple query plans were used before and after the latency increase, the SQL statement may have multiple valid query plans. This can occur when the optimizer chooses a plan based on literal values in the SQL query, those replaced by the "_" placeholder in the statement fingerprint. The optimizer may decide that different plans are better for different literal values. -With multiple valid query plans, you’re not just looking for a plan change, but for a shift in the _distribution of plans_ used for the statement. +With multiple valid query plans, you're not just looking for a plan change, but for a shift in the _distribution of plans_ used for the statement. -- Look at the query plans that were used in the time interval after the latency increase. Note the values in the **Execution Count** column for each plan. Repeat the process for the interval before the latency increase. This will let you know not only if the same query plans were being used during both intervals, but also if their distributions changed. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. +- On the **Explain Plans** tab, refer to the [**Plan Distribution Over Time**]({% link {{ page.version.version }}/ui-statements-page.md %}#plan-distribution-over-time) graph. Note the distribution of query plans both before and after the latency increase. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. {{site.data.alerts.callout_success}} If you couldn’t identify a specific moment when latency increased, you won’t have a clear "before" and "after" to compare. In this case, it’s still helpful to have a general sense of when the increase occurred (using the methods from Step 1) even if the range spans several hours. You can then use the above methods (in Step 3) to compare query plans on a rolling basis by changing the custom time interval to consecutive hour-long intervals. This approach can help identify the specific interval when the latency spike occurred. diff --git a/src/current/v26.1/troubleshoot-query-plan-regressions.md b/src/current/v26.1/troubleshoot-query-plan-regressions.md index 87ee5aaad4c..a1756058958 100644 --- a/src/current/v26.1/troubleshoot-query-plan-regressions.md +++ b/src/current/v26.1/troubleshoot-query-plan-regressions.md @@ -90,9 +90,9 @@ If the newer plan differs from the older plan, the query plan has changed: If multiple query plans were used before and after the latency increase, the SQL statement may have multiple valid query plans. This can occur when the optimizer chooses a plan based on literal values in the SQL query, those replaced by the "_" placeholder in the statement fingerprint. The optimizer may decide that different plans are better for different literal values. -With multiple valid query plans, you’re not just looking for a plan change, but for a shift in the _distribution of plans_ used for the statement. +With multiple valid query plans, you're not just looking for a plan change, but for a shift in the _distribution of plans_ used for the statement. -- Look at the query plans that were used in the time interval after the latency increase. Note the values in the **Execution Count** column for each plan. Repeat the process for the interval before the latency increase. This will let you know not only if the same query plans were being used during both intervals, but also if their distributions changed. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. +- On the **Explain Plans** tab, refer to the [**Plan Distribution Over Time**]({% link {{ page.version.version }}/ui-statements-page.md %}#plan-distribution-over-time) graph. Note the distribution of query plans both before and after the latency increase. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. {{site.data.alerts.callout_success}} If you couldn’t identify a specific moment when latency increased, you won’t have a clear "before" and "after" to compare. In this case, it’s still helpful to have a general sense of when the increase occurred (using the methods from Step 1) even if the range spans several hours. You can then use the above methods (in Step 3) to compare query plans on a rolling basis by changing the custom time interval to consecutive hour-long intervals. This approach can help identify the specific interval when the latency spike occurred. diff --git a/src/current/v26.2/troubleshoot-query-plan-regressions.md b/src/current/v26.2/troubleshoot-query-plan-regressions.md index c1d0c6c5318..71168cca68e 100644 --- a/src/current/v26.2/troubleshoot-query-plan-regressions.md +++ b/src/current/v26.2/troubleshoot-query-plan-regressions.md @@ -92,7 +92,7 @@ If multiple query plans were used before and after the latency increase, the SQL With multiple valid query plans, you’re not just looking for a plan change, but for a shift in the _distribution of plans_ used for the statement. -- Look at the query plans that were used in the time interval after the latency increase. Note the values in the **Execution Count** column for each plan. Repeat the process for the interval before the latency increase. This will let you know not only if the same query plans were being used during both intervals, but also if their distributions changed. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. +- On the **Explain Plans** tab, refer to the [**Plan Distribution Over Time**]({% link {{ page.version.version }}/ui-statements-page.md %}#plan-distribution-over-time) graph. Note the distribution of query plans both before and after the latency increase. If the distribution shifts toward a plan with higher average execution time, it may indicate a query plan regression. {{site.data.alerts.callout_success}} If you couldn’t identify a specific moment when latency increased, you won’t have a clear "before" and "after" to compare. In this case, it’s still helpful to have a general sense of when the increase occurred (using the methods from Step 1) even if the range spans several hours. You can then use the above methods (in Step 3) to compare query plans on a rolling basis by changing the custom time interval to consecutive hour-long intervals. This approach can help identify the specific interval when the latency spike occurred.