Skip to main content

CockroachDB SQL Statistics

SQL statistic nameDescriptionDBmarlin collects?Doc Link
**duration**Computed field = STATISTICS→’statistics’→’svcLat’→’mean’ * STATISTICS→’statistics’→’cnt’ Yes - DerivedN/A
**executions**Computed field = STATISTICS→’statistics’→’cnt’ Yes - DerivedN/A
**execution_statistics__cnt**The number of times execution statistics were recorded. Yes CockroachDB Docs
**execution_statistics__contentionTime__mean**The time the statement spent contending for resources before being executed. Running mean value. Yes CockroachDB Docs
**execution_statistics__contentionTime__sqDiff**The time the statement spent contending for resources before being executed. Running sum of the squared difference from the mean. Yes CockroachDB Docs
**execution_statistics__cpuSQLNanos__mean**The amount of CPU time spent executing the statement in nanoseconds.  Running mean value. No CockroachDB Docs
**execution_statistics__cpuSQLNanos__sqDiff**The amount of CPU time spent executing the statement in nanoseconds.  Running sum of the squared difference from the mean. No CockroachDB Docs
**execution_statistics__maxDiskUsage__mean**The maximum temporary disk  usage (spilling) that occurred on a node. Running mean value. Yes CockroachDB Docs
**execution_statistics__maxDiskUsage__sqDiff**Running sum of the squared difference from the mean of the maximum temporary disk usage (spilling) that occurred while executing this statement. Yes CockroachDB Docs
**execution_statistics__maxMemUsage__mean**Running mean value of the maximum memory usage that occurred on a node. Yes CockroachDB Docs
**execution_statistics__maxMemUsage__sqDiff**Running sum of the squared difference from the mean of the maximum memory usage that occurred on a node. Yes CockroachDB Docs
**execution_statistics__networkBytes__mean**Running mean value of the number of bytes sent over the network. Yes CockroachDB Docs
**execution_statistics__networkBytes__sqDiff**Running sum of the squared difference from the mean of the number of bytes sent over the network. Yes CockroachDB Docs
**execution_statistics__networkMsgs__mean**Running mean value of the number of messages sent over the network. Yes CockroachDB Docs
**execution_statistics__networkMsgs__sqDiff**Running sum of the squared difference from the mean of the number of messages sent over the network. Yes CockroachDB Docs
**statistics__bytesRead__mean**Running mean value of the number of bytes read from disk. Yes CockroachDB Docs
**statistics__bytesRead__sqDiff**Running sum of the squared difference from the mean of the number of bytes read from disk. Yes CockroachDB Docs
**statistics__cnt**The total number of times this statement was executed since the begin of the aggregation period. Yes CockroachDB Docs
**statistics__firstAttemptCnt**The total number of times a first attempt was executed. Yes CockroachDB Docs
**statistics__idleLat__mean**Running mean value of the time spent waiting for the client to send the statement while holding the transaction open. No CockroachDB Docs
**statistics__idleLat__sqDiff**Running sum of the squared difference from the mean of the time spent waiting for the client to send the statement while holding the transaction open. No CockroachDB Docs
**statistics__indexes**The list of indexes used by the statement. No CockroachDB Docs
**statistics__lastErrorCode**The PostgreSQL Error Code from the last failed execution of the statement fingerprint. No CockroachDB Docs
**statistics__lastExecAt**The last timestamp the statement was executed. No CockroachDB Docs
**statistics__maxRetries**The maximum observed number of automatic retries in the aggregation period. Yes CockroachDB Docs
**statistics__nodes**An ordered list of nodes IDs on which the statement was executed. No CockroachDB Docs
**statistics__numRows__mean**Running mean value of the number of rows returned or observed. Yes CockroachDB Docs
**statistics__numRows__sqDiff**Running sum of the squared difference from the mean of the number of rows returned or observed. Yes CockroachDB Docs
**statistics__ovhLat__mean**Running mean value of the difference between svcLat and the sum of parseLat+planLat+runLat latencies. Yes CockroachDB Docs
**statistics__ovhLat__sqDiff**Running sum of the squared difference from the mean. The difference between svcLat and the sum of parseLat+planLat+runLat latencies. Yes CockroachDB Docs
**statistics__parseLat__mean**Running mean value of the time to transform the SQL string into an abstract syntax tree (AST). Yes CockroachDB Docs
**statistics__parseLat__sqDiff**Running sum of the squared difference from the mean of the time to transform the SQL string into an abstract syntax tree (AST). Yes CockroachDB Docs
**statistics__planGists**A sequence of bytes representing the flattened tree of operators and various operator specific metadata of the statement plan. No CockroachDB Docs
**statistics__planLat__mean**Running mean value of the time to transform the AST into a logical query plan. Yes CockroachDB Docs
**statistics__planLat__sqDiff**Running sum of the squared difference from the mean of the time to transform the AST into a logical query plan. Yes CockroachDB Docs
**statistics__rowsRead__mean**Running mean value of the number of rows read from disk. Yes CockroachDB Docs
**statistics__rowsRead__sqDiff**Running sum of the squared difference from the mean of the number of rows read from disk. Yes CockroachDB Docs
**statistics__rowsWritten__mean**Running mean value of the number of rows written to disk. Yes CockroachDB Docs
**statistics__rowsWritten__sqDiff**Running sum of the squared difference from the mean of the number of rows written to disk. Yes CockroachDB Docs
**statistics__runLat__mean**Running mean value of the time to run the query and fetch or compute the result rows. Yes CockroachDB Docs
**statistics__runLat__sqDiff**Running sum of the squared difference from the mean of the time to run the query and fetch or compute the result rows. Yes CockroachDB Docs
**statistics__svcLat__mean**Running mean value of the time to service the query, from start of parse to end of execute. Yes CockroachDB Docs
**statistics__svcLat__sqDiff**Running sum of the squared difference from the mean of the time to service the query, from start of parse to end of execute. Yes CockroachDB Docs

Search online​

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.