Skip to main content

CockroachDB SQL Statistics

SQL statistic nameDescriptionDBmarlin collects?Doc Link
durationComputed field = STATISTICS→’statistics’→’svcLat’→’mean’ * STATISTICS→’statistics’→’cnt’ Yes - DerivedN/A
executionsComputed field = STATISTICS→’statistics’→’cnt’ Yes - DerivedN/A
execution_statistics__cntThe number of times execution statistics were recorded. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__contentionTime__meanThe time the statement spent contending for resources before being executed. Running mean value. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__contentionTime__sqDiffThe time the statement spent contending for resources before being executed. Running sum of the squared difference from the mean. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__cpuSQLNanos__meanThe amount of CPU time spent executing the statement in nanoseconds.  Running mean value. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__cpuSQLNanos__sqDiffThe amount of CPU time spent executing the statement in nanoseconds.  Running sum of the squared difference from the mean. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__maxDiskUsage__meanThe maximum temporary disk  usage (spilling) that occurred on a node. Running mean value. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__maxDiskUsage__sqDiffRunning sum of the squared difference from the mean of the maximum temporary disk usage (spilling) that occurred while executing this statement. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__maxMemUsage__meanRunning mean value of the maximum memory usage that occurred on a node. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__maxMemUsage__sqDiffRunning sum of the squared difference from the mean of the maximum memory usage that occurred on a node. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__networkBytes__meanRunning mean value of the number of bytes sent over the network. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__networkBytes__sqDiffRunning sum of the squared difference from the mean of the number of bytes sent over the network. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__networkMsgs__meanRunning mean value of the number of messages sent over the network. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
execution_statistics__networkMsgs__sqDiffRunning sum of the squared difference from the mean of the number of messages sent over the network. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__bytesRead__meanRunning mean value of the number of bytes read from disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__bytesRead__sqDiffRunning sum of the squared difference from the mean of the number of bytes read from disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__cntThe total number of times this statement was executed since the begin of the aggregation period. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__firstAttemptCntThe total number of times a first attempt was executed. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__idleLat__meanRunning mean value of the time spent waiting for the client to send the statement while holding the transaction open. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__idleLat__sqDiffRunning 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 https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__indexesThe list of indexes used by the statement. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__lastErrorCodeThe PostgreSQL Error Code from the last failed execution of the statement fingerprint. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__lastExecAtThe last timestamp the statement was executed. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__maxRetriesThe maximum observed number of automatic retries in the aggregation period. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__nodesAn ordered list of nodes IDs on which the statement was executed. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__numRows__meanRunning mean value of the number of rows returned or observed. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__numRows__sqDiffRunning sum of the squared difference from the mean of the number of rows returned or observed. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__ovhLat__meanRunning mean value of the difference between svcLat and the sum of parseLat+planLat+runLat latencies. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__ovhLat__sqDiffRunning sum of the squared difference from the mean. The difference between svcLat and the sum of parseLat+planLat+runLat latencies. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__parseLat__meanRunning mean value of the time to transform the SQL string into an abstract syntax tree (AST). Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__parseLat__sqDiffRunning sum of the squared difference from the mean of the time to transform the SQL string into an abstract syntax tree (AST). Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__planGistsA sequence of bytes representing the flattened tree of operators and various operator specific metadata of the statement plan. No https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__planLat__meanRunning mean value of the time to transform the AST into a logical query plan. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__planLat__sqDiffRunning sum of the squared difference from the mean of the time to transform the AST into a logical query plan. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__rowsRead__meanRunning mean value of the number of rows read from disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__rowsRead__sqDiffRunning sum of the squared difference from the mean of the number of rows read from disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__rowsWritten__meanRunning mean value of the number of rows written to disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__rowsWritten__sqDiffRunning sum of the squared difference from the mean of the number of rows written to disk. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__runLat__meanRunning mean value of the time to run the query and fetch or compute the result rows. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__runLat__sqDiffRunning sum of the squared difference from the mean of the time to run the query and fetch or compute the result rows. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__svcLat__meanRunning mean value of the time to service the query, from start of parse to end of execute. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column
statistics__svcLat__sqDiffRunning sum of the squared difference from the mean of the time to service the query, from start of parse to end of execute. Yes https://www.cockroachlabs.com/docs/stable/crdb-internal#statistics-column

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.