Transactions Page

Note:

On a secure cluster you must be an admin user to access this area of the DB Console. See DB Console security.

The Transactions page helps you:

  • Identify frequently retried or high latency transactions.
  • View transaction details.
Tip:

In contrast to the Statements page, which displays SQL statement fingerprints, the Transactions page displays SQL statement fingerprints grouped by transaction.

To view this page, access the DB Console and click Transactions in the left-hand navigation.

Search and filter

By default, this page shows transactions from all applications and databases running on the cluster.

You can search for transactions using the search field or using the date field.

To search by date, pick a date range that is within the time period since the statistics were last cleared. Click reset time to reset the date.

To filter the transactions by application_name, select App and choose one or more applications. When no application is selected internal transactions are not displayed.

Note:
  • Internal transactions are displayed under the $ internal app.
  • Transactions from the SQL shell are displayed under the $ cockroach app.
  • If you haven't set application_name in a client connection string, it appears as unset.

To filter transactions in which a SQL statement fingerprint exceeds a specified latency value, fill in the fields in Query fingerprint runs longer than.

Click Column selector to select the columns to display.

Transaction statistics

Statistics are aggregated once an hour and organized by Interval Start Time. Statistics between two hourly intervals belong to the nearest hour rounded down. For example, a statement execution ending at 1:50 would have its statistics aggregated in the 1:00 interval start time.

Statistics are persisted in the crdb_internal table. The default retention period of this table is based on the number of rows up to 10 million records. When this threshold is reached, the oldest records are deleted.

To reset SQL statistics in the DB Console UI and crdb_internal tables, click clear SQL stats.

Note:

The diagnostics.sql_stat_reset.interval cluster setting no longer controls the DB Console or the crdb_internal.statement_statistics and crdb_internal.transaction_statistics tables. diagnostics.sql_stat_reset.interval still resets the in-memory statistics (node_statement_statistics and node_transaction_statistics).

For an example of querying the statistics table, see Example.

Understand the Transactions page

Use the Transactions page to identify transactions that you want to troubleshoot, such as transactions that are experiencing high latencies, multiple retries, or execution failures.

Tip:

If you haven't yet executed any transactions in the cluster as a user, this page will be blank.

Transactions table

The Transactions table gives details for each SQL statement fingerprint in the transaction:

Column Description
Transactions The SQL statement fingerprints that make up the transaction.

To view the transaction fingerprint and details, click to open the Transaction Details page.
Interval Start Time (UTC) The start time of the statistics aggregation interval for a transaction.

For example, if a statement is executed at 1:23PM it will fall in the 1:00PM - 2:00PM time interval.
Execution Count Cumulative number of executions of this transaction within the last hour.

The bar indicates the ratio of runtime success (gray) to retries (red) for the transaction.
Rows Read Average number of rows read from disk while executing this transaction within the last hour.

The gray bar indicates the mean number of rows returned. The blue bar indicates one standard deviation from the mean.
Bytes Read Aggregation of all bytes read from disk across all operators for this transaction within the last hour.

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 of this transaction within the last hour.

The gray bar indicates the mean latency. The blue bar indicates one standard deviation from the mean.
Contention Average time this transaction was in contention with other transactions within the last hour.
Max Memory Maximum memory used by this transaction at any time during its execution within the last hour.

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 for this transaction within the last hour.

If this value is 0, the transaction was executed on a single node.

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 of this transaction within the last hour.
Regions/Nodes The region and nodes in which the transaction was executed.

Regions/Nodes are not visible for CockroachDB Serverless (beta) clusters.
Statements Number of SQL statements in the transaction.
Note:

Significant transactions on your database are likely to have a high execution count or number of rows read.

Transaction Details page

Click a transaction fingerprint to open Transaction Details.

  • The transaction fingerprint is displayed as a list of the individual SQL statement fingerprints in the transaction.
  • The Mean transaction time is the mean average time it took to execute the transaction within the last hour.
  • Transaction resource usage shows overall statistics about the transaction.
    • Mean rows/bytes read shows the mean average number of rows and bytes read from the storage layer during the execution of the transaction within the last hour.
    • Bytes read over network displays the amount of data transferred over the network for this transaction within the last hour.

      If this value is 0, the statement was executed on a single node.
    • Max memory usage is the maximum memory used by this transaction at any time during its execution within the last hour or specified time interval.
    • Max scratch disk usage displays the maximum amount of data spilled to temporary storage on disk while executing this transaction within the last hour or specified time interval.

The Statements table displays the statement fingerprints of all the statements in the transaction. To display the details of a statement, click a statement fingerprint.

See also

YesYes NoNo