SQL Dashboard

The SQL dashboard in the DB Console lets you monitor the performance of your SQL queries. To view this dashboard, access the DB Console, click Metrics on the left-hand navigation bar, and then select Dashboard > SQL.

Dashboard navigation

Use the Graph menu to display metrics for your entire cluster or for a specific node.

To the right of the Graph and Dashboard menus, a range selector allows you to filter the view for a predefined timeframe or custom date/time range. Use the navigation buttons to move to the previous, next, or current timeframe. Note that the active timeframe is reflected in the URL and can be easily shared.

For monitoring CockroachDB, it is sufficient to use the Open SQL Sessions, SQL Byte Traffic, SQL Statements, Service Latency, and Transactions graphs.

The SQL dashboard displays the following time series graphs:

Open SQL Sessions

  • In the node view, the graph shows the number of connections currently open between the client and the selected node.

  • In the cluster view, the graph shows the total number of SQL client connections to all nodes combined, with lines for each node.

Open SQL Transactions

  • In the node view, the graph shows the total number of open SQL transactions on the node.

  • In the cluster view, the graph shows the total number of open SQL transactions across all nodes in the cluster.

See the Transactions page for more details on the transactions.

Active SQL Statements

  • In the node view, the graph shows the total number of SQL statements currently running on that node.

  • In the cluster view, the graph shows the total number of SQL statements currently running across all nodes in the cluster.

See the Statements page for more details on the cluster's SQL statements.

SQL Byte Traffic

The SQL Byte Traffic graph helps you correlate SQL query count to byte traffic, especially in bulk data inserts or analytic queries that return data in bulk.

  • In the node view, the graph shows the current byte throughput (bytes/second) between all the currently connected SQL clients and the node. There are lines for bytes in and bytes out.

  • In the cluster view, the graph shows the aggregate client throughput across all nodes. There are lines for bytes in and bytes out.

SQL Statements

  • In the node view, the graph shows the 10-second average of the number of SELECT/INSERT/UPDATE/DELETE statements per second issued by SQL clients on the node.

  • In the cluster view, the graph shows the sum of the per-node averages, that is, an aggregate estimation of the current statement load over the cluster, assuming the last 10 seconds of activity per node are representative of this load.

SQL Statement Errors

  • In the node view, the graph shows the 10-second average of the number of SQL statements issued to the node that returned a planning, runtime, or retry error.

  • In the cluster view, the graph shows the 10-second average of the number of SQL statements that returned a planning, runtime, or retry error across all nodes.

See the Statements page for more details on the cluster's SQL statements.

SQL Statement Contention

  • In the node view, the graph shows the total number of SQL statements that experienced contention on that node.

  • In the cluster view, the graph shows the total number of SQL statements that experienced contention across all nodes in the cluster.

See the Statements page for more details on the cluster's SQL statements.

Active Flows for Distributed SQL Statements

  • In the node view, the graph shows the number of flows on that node contributing to the currently running distributed SQL statements.

  • In the cluster view, the graph shows the number of flows across all nodes in the cluster contributing to the currently running distributed SQL statements.

Service Latency: SQL, 99th percentile

Service latency is calculated as the time in nanoseconds between when the cluster receives a query and finishes executing the query. This time does not include returning results to the client.

  • In the node view, the graph shows the 99th percentile of service latency for the node. Over the last minute this node executed 99% of queries within this time, not including network latency between the node and the client.

  • In the cluster view, the graph shows the 99th percentile of service latency across all nodes in the cluster. There are lines for each node in the cluster. Over the last minute the node executed 99% of queries within this time, not including network latency between the node and the client.

Service Latency: SQL, 90th percentile

Service latency is calculated as the time in nanoseconds between when the cluster receives a query and finishes executing the query. This time does not include returning results to the client.

  • In the node view, the graph shows the 90th percentile of service latency for the node. Over the last minute this node executed 90% of queries within this time, not including network latency between the node and the client.

  • In the cluster view, the graph shows the 90th percentile of service latency across all nodes in the cluster. There are lines for each node in the cluster. Over the last minute the cluster executed 90% of queries within this time, not including network latency between the node and the client.

KV Execution Latency: 99th percentile

KV execution latency is calculated as the time in milliseconds between when the KV layer receives the request and delivers a response.

  • In the node view, the graph shows the 99th percentile of KV execution latency for the node. Over the last minute the node executed 99% of requests within this time.

  • In the cluster view, the graph shows the 99th percentile of KV execution latency for each node in the cluster. There are lines for each node in the cluster. Over the last minute the node executed 99% of requests within this time.

KV Execution Latency: 90th percentile

KV execution latency is calculated as the time in milliseconds between when the KV layer receives the request and delivers a response.

  • In the node view, the graph shows the 90th percentile of KV execution latency for the node. Over the last minute the node executed 90% of requests within this time.

  • In the cluster view, the graph shows the 90th percentile of KV execution latency for each node in the cluster. There are lines for each node in the cluster. Over the last minute the node executed 90% of requests within this time.

Transactions

  • In the node view, the graph shows the 10-second average of the number of opened (Begin), committed (Commits), rolled back (Rollbacks), and aborted (Aborts) transactions per second issued by SQL clients on the node.

  • In the cluster view, the graph shows the sum of the per-node averages, that is, an aggregate estimation of the current transactions load over the cluster, assuming the last 10 seconds of activity per node are representative of this load.

If the graph shows excessive aborts or rollbacks, it might indicate issues with the SQL statements. In that case, re-examine statements to lower contention.

See the Transactions page for more details on the transactions.

Transaction Latency: 99th percentile

Transaction latency is calculated as the total time in nanoseconds a transaction took to complete.

  • In the node view, the graph shows the 99th percentile of transaction time over a 1 minute period for the node. Over the last minute the node completed 99% of transactions within this time.

  • In the cluster view, the graph shows the 99th percentile of transaction time over a 1 minute period for each node in the cluster. Over the last minute the node completed 99% of transactions within this time.

See the Transactions page for more details on the transactions.

Transaction Latency: 90th percentile

Transaction latency is calculated as the total time in nanoseconds a transaction took to complete.

  • In the node view, the graph shows the 90th percentile of transaction time over a 1 minute period for the node. Over the last minute the node completed 90% of transactions within this time.

  • In the cluster view, the graph shows the 90th percentile of transaction time over a 1 minute period for each node in the cluster. Over the last minute the node completed 90% of transactions within this time.

See the Transactions page for more details on the transactions.

SQL Memory

  • In the node view, the graph shows the current amount of memory in KiB allocated to the SQL layer on this node. This amount is what is compared against the node's --max-sql-memory flag.

  • In the cluster view, the graph shows the current amount of memory in KiB allocated to the SQL layer on all nodes in the cluster. This amount is what is compared against the node's --max-sql-memory flag.

Schema Changes

  • In the node view, the graph shows the total number of DDL statements per second on the node.

  • In the cluster view, the graph shows the total number of DDL statements per second across all nodes in the cluster.

Statement Denials: Cluster Settings

Statement denials are statements that were denied due to a cluster setting with the following format:

{feature}.{statement_type}.enabled = FALSE
  • In the node view, the graph shows the total number of statements denied per second on this node.

  • In the cluster view, the graph shows the total number of statements denied per second across all nodes in the cluster.

Summary and events

Summary panel

A Summary panel of key metrics is displayed to the right of the timeseries graphs.

Metric Description
Total Nodes The total number of nodes in the cluster. Decommissioned nodes are not included in this count.
Capacity Used The storage capacity used as a percentage of usable capacity allocated across all nodes.
Unavailable Ranges The number of unavailable ranges in the cluster. A non-zero number indicates an unstable cluster.
Queries per second The total number of SELECT, UPDATE, INSERT, and DELETE queries executed per second across the cluster.
P99 Latency The 99th percentile of service latency.
Note:

If you are testing your deployment locally with multiple CockroachDB nodes running on a single machine (this is not recommended in production), you must explicitly set the store size per node in order to display the correct capacity. Otherwise, the machine's actual disk capacity will be counted as a separate store for each node, thus inflating the computed capacity.

Events panel

Underneath the Summary panel, the Events panel lists the 5 most recent events logged for all nodes across the cluster. To list all events, click View all events.

DB Console Events

The following types of events are listed:

  • Database created
  • Database dropped
  • Table created
  • Table dropped
  • Table altered
  • Index created
  • Index dropped
  • View created
  • View dropped
  • Schema change reversed
  • Schema change finished
  • Node joined
  • Node decommissioned
  • Node restarted
  • Cluster setting changed

See also

YesYes NoNo