Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/current/_includes/v24.3/ui/statement-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ The following screenshot shows an execution of the query discussed in [Overview]

<img src="/docs/images/{{ page.version.version }}/ui_plan_table.png" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### 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.

<img src="{{ 'images/v24.3/ui_plan_distribution_over_time.png' | relative_url }}" alt="Plan distribution over time graph" style="border:1px solid #eee;max-width:100%" />

#### Plan table

The plan table shows the following details:

Column | Description
Expand Down
32 changes: 21 additions & 11 deletions src/current/_includes/v25.2/ui/statement-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_overview.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_fingerprint_overview.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />

#### Insights

Expand All @@ -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):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_insights.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_fingerprint_insights.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />

#### Charts

Expand All @@ -65,15 +65,25 @@ Charts following the execution attributes display statement fingerprint statisti

The following charts summarize the executions of the statement fingerprint illustrated in [Overview](#overview):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_charts.png' | relative_url }}" alt="Statement fingerprint charts" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_fingerprint_charts.png' | relative_url }}" alt="Statement fingerprint charts" style="border:1px solid #eee;max-width:100%" />

### Explain Plans

The **Explain Plans** tab displays statement plans for an [explainable statement]({{ link_prefix }}sql-grammar.html#preparable_stmt) in the selected [time interval](#time-interval). You can use this information to optimize the query. For more information about plans, see [`EXPLAIN`]({{ link_prefix }}explain.html).

The following screenshot shows an execution of the query discussed in [Overview](#overview):

<img src="{{ 'images/v24.2/ui_plan_table.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_plan_table.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### 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.

<img src="{{ 'images/v25.2/ui_plan_distribution_over_time.png' | relative_url }}" alt="Plan distribution over time graph" style="border:1px solid #eee;max-width:100%" />

#### Plan table

The plan table shows the following details:

Expand All @@ -94,15 +104,15 @@ 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:

<img src="{{ 'images/v24.2/ui_statement_plan.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_plan.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### Insights

The plan table displays the number of insights related to the plan. If a plan has at least 1 insight, when you click the plan gist, a table of insights that describe how to improve the performance will follow the plan.

The following screenshot shows 1 insight found after running the query discussed in [Overview](#overview) 6 or more times:

<img src="{{ 'images/v24.2/plan_with_insight.png' | relative_url }}" alt="Plan with insight" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/plan_with_insight.png' | relative_url }}" alt="Plan with insight" style="border:1px solid #eee;max-width:100%" />

{{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.
Expand All @@ -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.

<img src="{{ 'images/v24.2/ui_statement_plan_2.png' | relative_url }}" alt="Plan table after index" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_plan_2.png' | relative_url }}" alt="Plan table after index" style="border:1px solid #eee;max-width:100%" />

### Diagnostics

Expand All @@ -134,7 +144,7 @@ Diagnostics will be collected a maximum of *N* times for a given activated finge

#### Activate diagnostics collection and download bundles

<img src="{{ 'images/v24.2/ui_activate_diagnostics.png' | relative_url }}" alt="Activate statement diagnostics" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_activate_diagnostics.png' | relative_url }}" alt="Activate statement diagnostics" style="border:1px solid #eee;max-width:100%" />

{{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.
Expand All @@ -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.

<img src="{{ 'images/v24.2/ui_statement_diagnostics.png' | relative_url }}" alt="Statement diagnostics table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.2/ui_statement_diagnostics.png' | relative_url }}" alt="Statement diagnostics table" style="border:1px solid #eee;max-width:100%" />

The collection status values are:

- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click <img src="{{ 'images/v24.2/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)**.
- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click <img src="{{ 'images/v25.2/ui-download-button.png' | relative_url }}" alt="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.

Expand All @@ -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 <img src="{{ 'images/v24.2/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)** to download any diagnostics bundle.
Click <img src="{{ 'images/v25.2/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)** to download any diagnostics bundle.
32 changes: 21 additions & 11 deletions src/current/_includes/v25.3/ui/statement-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_overview.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_fingerprint_overview.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />

#### Insights

Expand All @@ -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):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_insights.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_fingerprint_insights.png' | relative_url }}" alt="Statement fingerprint overview" style="border:1px solid #eee;max-width:100%" />

#### Charts

Expand All @@ -65,15 +65,25 @@ Charts following the execution attributes display statement fingerprint statisti

The following charts summarize the executions of the statement fingerprint illustrated in [Overview](#overview):

<img src="{{ 'images/v24.2/ui_statement_fingerprint_charts.png' | relative_url }}" alt="Statement fingerprint charts" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_fingerprint_charts.png' | relative_url }}" alt="Statement fingerprint charts" style="border:1px solid #eee;max-width:100%" />

### Explain Plans

The **Explain Plans** tab displays statement plans for an [explainable statement]({{ link_prefix }}sql-grammar.html#preparable_stmt) in the selected [time interval](#time-interval). You can use this information to optimize the query. For more information about plans, see [`EXPLAIN`]({{ link_prefix }}explain.html).

The following screenshot shows an execution of the query discussed in [Overview](#overview):

<img src="{{ 'images/v24.2/ui_plan_table.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_plan_table.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### 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.

<img src="{{ 'images/v25.3/ui_plan_distribution_over_time.png' | relative_url }}" alt="Plan distribution over time graph" style="border:1px solid #eee;max-width:100%" />

#### Plan table

The plan table shows the following details:

Expand All @@ -94,15 +104,15 @@ 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:

<img src="{{ 'images/v24.2/ui_statement_plan.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_plan.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### Insights

The plan table displays the number of insights related to the plan. If a plan has at least 1 insight, when you click the plan gist, a table of insights that describe how to improve the performance will follow the plan.

The following screenshot shows 1 insight found after running the query discussed in [Overview](#overview) 6 or more times:

<img src="{{ 'images/v24.2/plan_with_insight.png' | relative_url }}" alt="Plan with insight" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/plan_with_insight.png' | relative_url }}" alt="Plan with insight" style="border:1px solid #eee;max-width:100%" />

{{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.
Expand All @@ -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.

<img src="{{ 'images/v24.2/ui_statement_plan_2.png' | relative_url }}" alt="Plan table after index" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_plan_2.png' | relative_url }}" alt="Plan table after index" style="border:1px solid #eee;max-width:100%" />

### Diagnostics

Expand All @@ -134,7 +144,7 @@ Diagnostics will be collected a maximum of *N* times for a given activated finge

#### Activate diagnostics collection and download bundles

<img src="{{ 'images/v24.2/ui_activate_diagnostics.png' | relative_url }}" alt="Activate statement diagnostics" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_activate_diagnostics.png' | relative_url }}" alt="Activate statement diagnostics" style="border:1px solid #eee;max-width:100%" />

{{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.
Expand All @@ -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.

<img src="{{ 'images/v24.2/ui_statement_diagnostics.png' | relative_url }}" alt="Statement diagnostics table" style="border:1px solid #eee;max-width:100%" />
<img src="{{ 'images/v25.3/ui_statement_diagnostics.png' | relative_url }}" alt="Statement diagnostics table" style="border:1px solid #eee;max-width:100%" />

The collection status values are:

- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click <img src="{{ 'images/v24.2/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)**.
- **READY**: indicates that the diagnostics have been collected. To download the diagnostics bundle, click <img src="{{ 'images/v25.3/ui-download-button.png' | relative_url }}" alt="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.

Expand All @@ -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 <img src="{{ 'images/v24.2/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)** to download any diagnostics bundle.
Click <img src="{{ 'images/v25.3/ui-download-button.png' | relative_url }}" alt="Down arrow" /> **Bundle (.zip)** to download any diagnostics bundle.
10 changes: 10 additions & 0 deletions src/current/_includes/v25.4/ui/statement-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ The following screenshot shows an execution of the query discussed in [Overview]

<img src="{{ 'images/v25.4/ui_plan_table.png' | relative_url }}" alt="Plan table" style="border:1px solid #eee;max-width:100%" />

#### 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).

<img src="{{ 'images/v25.4/ui_plan_distribution_over_time.png' | relative_url }}" alt="Plan distribution over time graph" style="border:1px solid #eee;max-width:100%" />

#### Plan table

The plan table shows the following details:

Column | Description
Expand Down
Loading
Loading