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
4 changes: 4 additions & 0 deletions src/current/_includes/v26.1/ui/statement-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ The **Overview** section also displays the SQL statement fingerprint statistics
|**Execution Count** | The total number of executions. It is calculated as the sum of first attempts and retries. |
|**Contention Time** | The amount of time spent waiting for resources. For more information about contention, see [Understanding and avoiding transaction contention]({{ link_prefix }}performance-best-practices-overview.html#understanding-and-avoiding-transaction-contention). |
|**SQL CPU Time** | The amount of SQL CPU time spent executing the statement. The SQL CPU time represents the time spent and work done within SQL execution operators. It does not include SQL planning time or KV execution time. |
|**KV CPU Time** | The average KV CPU time spent executing the statement within the specified time interval. This represents [KV]({{ link_prefix }}architecture/overview.html#layers) work that is on the critical path of serving the query. It excludes time spent on asynchronous replication and in the [storage layer]({{ link_prefix }}architecture/storage-layer.html). |
|**Admission Wait Time** | Average time spent waiting in [admission control]({{ link_prefix }}admission-control.html) queues within the specified time interval. |
|**Client Wait Time** | The time spent waiting for the client to send the statement while holding the transaction open. A high wait time indicates that you should revisit the entire transaction and [batch your statements]({{ link_prefix }}transactions.html#batched-statements). |

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):
Expand Down Expand Up @@ -59,7 +61,9 @@ Charts following the execution attributes display statement fingerprint statisti
|**Rows Processed** | The total number of rows read and written. |
|**Execution Retries** | The number of [retries]({{ link_prefix }}transactions.html#transaction-retries). |
|**Execution Count** | The total number of executions. It is calculated as the sum of first attempts and retries. |
|**Admission Wait Time** | The time spent waiting in admission control queues. The gray bar indicates mean admission wait time. The blue bar indicates one standard deviation from the mean. |
|**Contention Time** | The amount of time spent waiting for resources. For more information about contention, see [Understanding and avoiding transaction contention]({{ link_prefix }}performance-best-practices-overview.html#understanding-and-avoiding-transaction-contention). |
|**KV CPU Time** | The KV CPU time spent executing within the specified time interval. This can be thought of as KV work that is on the critical path of serving the query. It does not include any asynchronous replication related work. The gray bar indicates mean KV CPU time. The blue bar indicates one standard deviation from the mean. |
|**SQL CPU Time** | The amount of SQL CPU time spent executing the statement. The SQL CPU time represents the time spent and work done within SQL execution operators. It does not include SQL planning time or KV execution time. |
|**Client Wait Time** | The time spent waiting for the client to send the statement while holding the transaction open. A high wait time indicates that you should revisit the entire transaction and [batch your statements]({{ link_prefix }}transactions.html#batched-statements). |

Expand Down
4 changes: 3 additions & 1 deletion src/current/_includes/v26.1/ui/statements-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Application Name | The name specified by the [`application_name`]({{ link_prefix
Statement Time | Average [planning and execution time]({{ link_prefix }}architecture/sql-layer.html#sql-parser-planner-executor) of statements with this statement fingerprint within the time interval. <br><br>The gray bar indicates the mean latency. The blue bar indicates one standard deviation from the mean. Hover over the bar to display exact values.
<a id="percent-of-all-runtime"></a>% of All Runtime | The percentage of execution time taken by this statement fingerprint compared to all other statements executed within the time period, including those not displayed. Runtime is calculated as the mean execution latency multiplied by the execution count.<br><br><b>Note:</b> The sum of the values in this column may not equal 100%. Each fingerprint's percentage is calculated by dividing the fingerprint's runtime by the sum of the runtimes for all statement fingerprints in the time interval. "All statement fingerprints" means all user statement fingerprints (not only those displayed by the [search criteria](#search-criteria)), as well as internal statement fingerprints that are never included in the displayed result set. The search criteria are applied after the `% of All Runtime` calculation.
Contention Time | Average time statements with this fingerprint were [in contention]({{ link_prefix }}performance-best-practices-overview.html#understanding-and-avoiding-transaction-contention) with other transactions within the time interval.<br><br>The gray bar indicates mean contention time. The blue bar indicates one standard deviation from the mean. Hover over the bar to display exact values.
SQL CPU Time | Average SQL CPU time spent executing within the specified time interval. It does not include SQL planning time or KV execution time. The gray bar indicates mean SQL CPU time. The blue bar indicates one standard deviation from the mean. <br><br>The SQL CPU time includes time spent in the [SQL layer]({{ link_prefix }}architecture/sql-layer.html). It does not include time spent in the [storage layer]({{ link_prefix }}architecture/storage-layer.html).
SQL CPU Time | Average SQL CPU time spent executing within the specified time interval. The SQL CPU time includes time spent in the [SQL layer]({{ link_prefix }}architecture/sql-layer.html). It does not include SQL planning time, KV execution time, or time spent in the [storage layer]({{ link_prefix }}architecture/storage-layer.html). The gray bar indicates mean SQL CPU time. The blue bar indicates one standard deviation from the mean.
KV CPU Time | Average KV CPU time spent executing within the specified time interval. This represents [KV]({{ link_prefix }}architecture/overview.html#layers) work that is on the critical path of serving the query. It excludes time spent on asynchronous replication and in the [storage layer]({{ link_prefix }}architecture/storage-layer.html). The gray bar indicates mean KV CPU time. The blue bar indicates one standard deviation from the mean.
Admission Wait Time | Average time spent waiting in [admission control]({{ link_prefix }}admission-control.html) queues within the specified time interval. The gray bar indicates mean admission wait time. The blue bar indicates one standard deviation from the mean.
Min Latency | The lowest latency value for all statement executions with this fingerprint.
Max Latency | The highest latency value for all statement executions with this fingerprint.
Rows Processed | Average number of rows read and written while executing statements with this fingerprint within the time interval.
Expand Down
4 changes: 3 additions & 1 deletion src/current/_includes/v26.1/ui/transactions-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Rows Processed | Average number of rows read and written while executing stateme
Bytes Read | Aggregation of all bytes [read from disk]({{ link_prefix }}architecture/life-of-a-distributed-transaction.html#reads-from-the-storage-layer) across all operators for this transaction within the time interval. <br><br>The gray bar indicates the mean number of bytes read from disk. The blue bar indicates one standard deviation from the mean.
Transaction Time | Average [planning and execution time]({{ link_prefix }}architecture/sql-layer.html#sql-parser-planner-executor) of this transaction within the time interval. <br><br>The gray bar indicates the mean latency. The blue bar indicates one standard deviation from the mean.
Contention Time | Average time this transaction was [in contention]({{ link_prefix }}performance-best-practices-overview.html#understanding-and-avoiding-transaction-contention) with other transactions within the time interval.<br><br>The gray bar indicates mean contention time. The blue bar indicates one standard deviation from the mean. Hover over the bar to display exact values.
CPU Time | Average CPU time spent executing within the specified time interval. <br><br> The gray bar indicates mean CPU time. The blue bar indicates one standard deviation from the mean. <br><br>The CPU time includes time spent in the [SQL layer]({{ link_prefix }}architecture/sql-layer.html). It does not include time spent in the [storage layer]({{ link_prefix }}architecture/storage-layer.html).
SQL CPU Time | Average SQL CPU time spent executing within the specified time interval. The SQL CPU time includes time spent in the [SQL layer]({{ link_prefix }}architecture/sql-layer.html).<br><br>The gray bar indicates mean SQL CPU time. The blue bar indicates one standard deviation from the mean.
Admission Wait Time | Average time spent waiting in [admission control]({{ link_prefix }}admission-control.html) queues within the specified time interval. The gray bar indicates mean admission wait time. The blue bar indicates one standard deviation from the mean.
KV CPU Time | Average KV CPU time spent executing within the specified time interval. This represents [KV]({{ link_prefix }}architecture/overview.html#layers) work that is on the critical path of serving the query. It excludes time spent on asynchronous replication and in the [storage layer]({{ link_prefix }}architecture/storage-layer.html).<br><br>The gray bar indicates mean KV CPU time. The blue bar indicates one standard deviation from the mean.
Max Memory | Maximum memory used by this transaction at any time during its execution within the time interval. <br><br>The gray bar indicates the average max memory usage. The blue bar indicates one standard deviation from the mean.
Network | Amount of [data transferred over the network]({{ link_prefix }}architecture/reads-and-writes-overview.html) for this transaction within the time interval. <br><br>If this value is 0, the transaction was executed on a single node. <br><br>The gray bar indicates the mean number of bytes sent over the network. The blue bar indicates one standard deviation from the mean.
Retries | Cumulative number of [retries]({{ link_prefix }}transactions.html#transaction-retries) of this transaction within the time interval.
Expand Down
2 changes: 2 additions & 0 deletions src/current/v26.1/crdb-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ The `NumericStat` type tracks two running values: the running mean `mean` and th
Field | Type | Description
------------|-----|------------
`execution_statistics -> cnt` | `INT64` | The number of times execution statistics were recorded.
<code>execution_statistics -> admissionWaitTime -> [mean&#124;sqDiff]</code> | `NumericStat` | The time (in nanoseconds) spent waiting in [admission control]({% link {{ page.version.version }}/admission-control.md %}) queues.
<code>execution_statistics -> contentionTime -> [mean&#124;sqDiff]</code> | `NumericStat` | The time (in seconds) the statement spent contending for resources before being executed.
<code>execution_statistics -> cpuSQLNanos -> [mean&#124;sqDiff]</code> | `NumericStat` | The amount of CPU time spent executing the statement in nanoseconds. The CPU time represents the time spent and work done within SQL execution operators. <br><br>The CPU time includes time spent in the [SQL layer]({% link {{ page.version.version }}/architecture/sql-layer.md %}). It does not include time spent in the [storage layer]({% link {{ page.version.version }}/architecture/storage-layer.md %}).
<code>execution_statistics -> maxDiskUsage -> [mean&#124;sqDiff]</code> | `NumericStat` | The maximum temporary disk usage (in bytes) that occurred while executing this statement. This is set in cases where a query had to spill to disk, e.g., when performing a large sort where not all of the tuples fit in memory.
Expand All @@ -970,6 +971,7 @@ Field | Type | Description
`statistics -> firstAttemptCnt` | `INT8` | The total number of times a first attempt was executed (either the one time in explicitly committed statements, or the first time in implicitly committed statements with implicit retries).
<code>statistics -> idleLat -> [mean&#124;sqDiff]</code> | `NumericStat` | The time (in seconds) spent waiting for the client to send the statement while holding the transaction open. A high wait time indicates that you should revisit the entire transaction and [batch your statements]({% link {{ page.version.version }}/transactions.md %}#batched-statements).
`statistics -> indexes` | Array of `String` | The list of indexes used by the statement. Each index has the format `{tableID}@{indexID}`.
<code>statistics -> kvCPUTimeNanos -> [mean&#124;sqDiff]</code> | `NumericStat` | The KV CPU time (in nanoseconds) spent executing the query. This represents [KV]({% link {{ page.version.version }}/architecture/overview.md %}#layers) work that is on the critical path of serving the query. It excludes time spent on asynchronous replication and in the [storage layer]({{ link_prefix }}architecture/storage-layer.html).
`statistics -> lastErrorCode` | `String` | The [PostgreSQL Error Code](https://www.postgresql.org/docs/current/errcodes-appendix.html) from the last failed execution of the statement fingerprint.
`statistics -> lastExecAt` | `TIMESTAMP` | The last timestamp the statement was executed.
`statistics -> maxRetries` | `INT8` | The maximum observed number of automatic retries in the aggregation period.
Expand Down
Loading