@Statistics

Documentation

VoltDB Home » Documentation » Using VoltDB

@Statistics

@Statistics — Returns statistics about the usage of the VoltDB database.

Synopsis

@Statistics String component, Integer delta-flag

Description

The @Statistics system procedure returns information about the VoltDB database. The first argument, component, specifies what aspect of VoltDB to return statistics about. The second argument, delta-flag, specifies whether statistics are reported from when the database started or since the last call to @Statistics where the flag was set.

If the delta-flag is set to zero, the system procedure returns statistics since the database started. If the delta-flag is non-zero, the system procedure returns statistics for the interval since the last time @Statistics was called with a non-zero flag. (If @Statistics has not been called with a non-zero flag before, the first call with the flag set returns statistics since startup.)

Note that in a cluster with K-safety, if a node fails, the statistics reported by this procedure are reset to zero for the node when it rejoins the cluster.

The following are the allowable values of component:

"COMMANDLOG"

Returns information about the progress of command logging, including the number of segment files in use and the amount of command log data waiting to be written to disk.

"CPU"

Returns information about the amount of CPU used by each VoltDB server process. CPU usage is returned as a number between 0 and 100 representing the amount of CPU used by the VoltDB process out of the total CPU available for that server.

"DRCONSUMER"

Returns information about the status of database replication on a DR consumer, including the status and data replication rate of each partition. This information is available only if the database is licensed for database replication and operating as a passive DR replica or an active XDCR database.

"DRPRODUCER"

Returns information about the status of database replication on a producer database, including how much data is waiting to be sent to the consumer. This information is available only if the database is licensed for database replication and is operating as a passive master or an active XDCR database.

"DRROLE"

Returns information about the current state of database replication (DR), including the role of the cluster (master, replica, or XDCR) and whether DR has started, is running, stopped, or been disabled.

"EXPORT"

Returns statistics on the export streams and targets, including how many records have be written, how many are pending, and the status of the export connection.

"IMPORT"

Returns statistics on the import streams, including how many import transactions have succeeded, failed, and been retried and how many rows have been read but not applied yet.

"INDEX"

Returns information about the indexes in the database, including the number of keys for each index and the estimated amount of memory used to store those keys. Separate information is returned for each partition in the database.

"INITIATOR"

Returns information on the number of procedure invocations for each stored procedure (including system and import procedures). The count of invocations is reported for each connection to the database.

"IOSTATS"

Returns information on the number of messages and amount of data (in bytes) sent to and from each connection to the database.

"LATENCY"

Returns statistics on the latency of transactions. The information reports on median, percentage (99% through 99.999%), and maximum latency over the most recent five second sampling period.

"LIVECLIENTS"

Returns information about the number of outstanding requests per client. You can use this information to determine how much work is waiting in the execution queues.

"MANAGEMENT"

Returns the same information as CPU, INDEX, INITIATOR, IOSTATS, MEMORY, PROCEDURE, and TABLE, except all in a single procedure call.

"MEMORY"

Returns statistics on the use of memory for each node in the cluster. MEMORY statistics include the current resident set size (RSS) of the VoltDB server process; the amount of memory used for Java temporary storage, database tables, indexes, and string (including varbinary) storage; as well as other information.

"PARTITIONCOUNT"

Returns information on the number of unique partitions in the cluster. The VoltDB cluster creates multiple partitions based on the number of servers and the number of sites per host requested. So, for example, a 2 node cluster with 4 sites per host will have 8 partitions. However, when you define a cluster with K-safety, there are duplicate partitions. PARTITIONCOUNT only reports the number of unique partitions available in the cluster.

"PLANNER"

Returns information on the use of cached plans within each partition. Queries in stored procedures are planned when the procedure is declared in the schema. However, ad hoc queries must be planned at runtime. To improve performance, VoltDB caches plans for ad hoc queries so they can be reused when a similar query is encountered later. There are two caches: the level 1 cache performs exact matches on queries and the level 2 cache parameterizes constants so it can match queries with the same plan but different input. The planner statistics provide information about the size of each cache, how frequently it is used, and the minimum, maximum, and average execution time of ad hoc queries as a result.

"PROCEDURE"

Returns information on the usage of stored procedures for each site within the database cluster sorted by partition. The information includes the name of the procedure, the number of invocations (for each site), and selected performance information on minimum, maximum, and average execution time.

"PROCEDUREDETAIL"

Returns detailed performance information about the individual statements within each stored procedure. PROCEDUREDETAIL returns information for each statement in each procedure, grouped by site and partition within the database cluster. The information includes the name of the procedure, the name of the statement, the number of invocations (for each site), and selected performance information on minimum, maximum, and average execution time.

"PROCEDUREINPUT"

Returns summary information on the size of the input data submitted with stored procedure invocations. PROCEDUREINPUT uses information from PROCEDURE, except it focuses on the input parameters and aggregates data for the entire cluster.

"PROCEDUREOUTPUT"

Returns summary information on the size of the result sets returned by stored procedure invocations. PROCEDUREOUTPUT uses information from PROCEDURE, except it focuses on the result sets and aggregates data for the entire cluster.

"PROCEDUREPROFILE"

Returns summary information on the usage of stored procedures averaged across all partitions in the cluster. The information from PROCEDUREPROFILE is similar to the information from PROCEDURE, except it focuses on the performance of the individual procedures rather than on procedures by partition. The weighted average across partitions is helpful for determining which stored procedures the application is spending most of its time in.

"QUEUE"

Returns statistics on the number of tasks in each partition's process queue and the average and maximum time tasks were waiting in the queue.

"REBALANCE"

Returns information on the current progress of rebalancing on the cluster. Rebalancing occurs when one or more nodes are added "on the fly" to an elastic cluster. If no rebalancing is occurring, no data is returned. During a rebalance, this selector returns information about the speed of migration of the data, the latency of rebalance tasks, and the estimated time until completion.

For rebalance, the delta flag to the system procedure is ignored. All rebalance statistics are cumulative for the current rebalance activity.

"SNAPSHOTSTATUS"

Returns information about up to ten of the most recent snapshots performed by the database. The results include the directory path and prefix for the snapshot, when it occurred, how long it took, and whether the snapshot was completed successfully or not. The results report on both native and CSV snapshots, as well as manual, automated, and command log snapshots. Note that this selector does not tell you whether the snapshot files still exist, only that the snapshot was performed. Use the @SnapshotScan procedure to determine what snapshots are available.

"TABLE"

Returns information about the database tables, including the number of rows per site for each table. This information can be useful for seeing how well the rows are distributed across the cluster for partitioned tables.

"TTL"

Returns information about the processing of expired data in "time to live" (TTL) tables, including how recently and how many records have been deleted.

Note that INITIATOR and PROCEDURE report information on both user-declared stored procedures and system procedures. These include certain system procedures that are used internally by VoltDB and are not intended to be called by client applications. Only the system procedures documented in this appendix are intended for client invocation.

Return Values

Returns different VoltTables depending on which component is requested. The following tables identify the structure of the return values for each component. (Note that the MANAGEMENT component returns seven VoltTables.)

COMMANDLOG — Returns a row for every server in the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
OUTSTANDING_BYTESBIGINTThe size, in bytes, of pending command log data. That is, data for transactions that have been initiated but the log has yet to be written to disk. For synchronous logging, this value is always zero.
OUTSTANDING_TXNSBIGINTThe size, in number of transactions, of pending command log data. That is, the number of transactions that have been initiated for which the log has yet to be written to disk. For synchronous logging, this value is always zero.
IN_USE_SEGMENT​_COUNTINTEGERThe total number of segment files currently in use for command logging.
SEGMENT_COUNTINTEGERThe number of segment files allocated, including currently unused segments.
FSYNC_INTERVALINTEGERThe average interval, in milliseconds, between the last 10 fsync system calls.

CPU — Returns a row for every server in the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
PERCENT_USEDBIGINTThe percentage of total CPU available used by the database server process.

DRCONSUMER — Returns two VoltTables. The first table returns a row for every host in the cluster, showing whether a replication snapshot is in progress and if it is, the status of transmission to the consumer.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CLUSTER_IDINTEGERThe numeric ID of the current cluster.
REMOTE_CLUSTER_IDINTEGERThe numeric ID of the producer cluster.
STATESTRING

A text string indicating the current state of replication. Possible values are:

  • UNINITIALIZED — DR has not begun yet or has stopped

  • INITIALIZE — DR is enabled and the replica is attempting to contact the producer

  • SYNC — DR has started and the consumer is synchronizing by receiving snapshots of existing data from the master

  • RECEIVE — DR is underway and the consumer is receiving binary logs from the master

  • DISABLE — DR has been canceled for some reason and the consumer is stopping DR

REPLICATION_RATE_1MBIGINTThe average rate of replication over the past minute. The data rate is measured in bytes per second.
REPLICATION_RATE_5MBIGINTThe average rate of replication over the past five minutes. The data rate is measured in bytes per second.

The second table contains information about the replication streams, which consist of a row per partition for each server. The data shows the current state of replication and how much data has been received by the consumer from each producer.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CLUSTER_IDINTEGERThe numeric ID of the current cluster.
REMOTE_CLUSTER_IDINTEGERThe numeric ID of the producer cluster.
PARTITION_IDINTEGERThe numeric ID for the logical partition.
IS_COVEREDSTRINGA text string of "true" or "false" indicating whether this partition is currently connected to and receiving data from a matching partition on the producer cluster.
COVERING_HOSTSTRINGThe host name of the server in the producer cluster that is providing DR data to this partition. If IS_COVERED is "false", this field is empty.
LAST_RECEIVED​_TIMESTAMPTIMESTAMPThe timestamp of the last transaction received from the producer.
LAST_APPLIED​_TIMESTAMPTIMESTAMPThe timestamp of the last transaction successfully applied to this partition on the consumer.
IS_PAUSEDSTRINGA text string of "true" or "false" indicating whether this partition is paused. A partition "pauses" when the schema of the DR tables on the producer change to no longer match the consumer and all binary logs prior to the change have been processed.

DRPRODUCER — Returns two VoltTables. The first table contains information about the replication streams, which consist of a row per partition for each server. The data shows the current state of replication and how much data is currently queued for each consumer.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CLUSTER_IDINTEGERThe numeric ID of the current cluster.
REMOTE_CLUSTER_IDINTEGERThe numeric ID of the consumer cluster.
PARTITION_IDINTEGERThe numeric ID for the logical partition.
STREAMTYPESTRINGThe type of stream, which can either be "TRANSACTIONS" or "SNAPSHOT".
TOTALBYTESBIGINTThe total number of bytes currently queued for transmission to the replica.
TOTALBYTES​IN​MEMORYBIGINTThe total number of bytes of queued data currently held in memory. If the amount of total bytes is larger than the amount in memory, the remainder is kept in overflow storage on disk.
TOTALBUFFERSBIGINTThe total number of buffers in this partition currently waiting for acknowledgement from the replica. The partitions buffer the binary logs to reduce overhead and optimize network transfers.
LASTQUEUEDDRIDBIGINTThe ID of the last transaction queued for transmission to the consumer.
LASTACK​DRIDBIGINTThe ID of the last transaction acknowledged by the consumer.
LASTQUEUEDTIMESTAMPTIMESTAMPThe timestamp of the last transaction queued for transmission to the consumer.
LASTACK​TIMESTAMPTIMESTAMPThe timestamp of the last transaction acknowledged by the consumer.
ISSYNCEDSTRINGA text string indicating whether the database is currently being replicated. If replication has not started, or the overflow capacity has been exceeded (that is, replication has failed), the value of ISSYNCED is "false". If replication is currently in progress, the value is "true".
MODESTRINGA text string indicating whether this particular partition is replicating data to the consumer ("NORMAL") or not ("PAUSED"). Only one copy of each logical partition actually sends data during replication. So for clusters with a K-safety value greater than zero, not all physical partitions will report "NORMAL" even when replication is in progress.
QUEUE_GAPBIGINTThe number of missing transactions between those already acknowledged by the consumer and the next available for transmission. Under normal operating conditions, this value is zero.
CONNECTION​_STATUSSTRINGA text string indicating whether the connection to the consumer is operational ("UP") or not ("DOWN"). If the connection between the producer and consumer is broken or if the producer does not hear from the consumer for more than 30 seconds, the connection is marked as "DOWN".

The second table returns a row for every host in the cluster, showing whether a replication snapshot is in progress and if it is, the status of transmission to the consumer.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CLUSTER_IDINTEGERThe numeric ID of the current cluster.
REMOTE_CLUSTER_IDINTEGERThe numeric ID of the consumer cluster.
STATESTRINGA text string indicating the current state of replication. Possible values are "OFF" (replication is not enabled), "PENDING" (replication is enabled but not occurring), and "ACTIVE" (replication is enabled and a replica database has initiated DR).
SYNC​SNAPSHOT​STATESTRINGA text string indicating the current state of the synchronization snapshot that begins replication. During normal operation, this value is "NONE" indicating either that replication is not active or that transactions are actively being replicated. If a synchronization snapshot is in progress, this value provides additional information about the specific activity underway.
ROWSIN​SYNC​SNAPSHOTBIGINTReserved for future use.
ROWSACKED​FORSYNC​SNAPSHOTBIGINTReserved for future use.

DRROLE — Returns one row per connection showing the current status of DR for that cluster.

NameDatatypeDescription
ROLESTRINGThe role of the current cluster in a DR relationship. Possible values are NONE, MASTER, REPLICA, and XDCR. (None indicates that no DR ID is defined and the cluster cannot participate in DR.)
STATESTRING

The current state of the DR relationship. Possible values are the following:

  • DISABLED — DR is not enabled for the cluster

  • PENDING — DR is enabled but communication with the other cluster has not begun

  • ACTIVE — Communication with the other cluster has begun

  • STOPPED — Communication with the other cluster has stopped due to a failure of some kind

Note that if DR stops, issuing the voltadmin dr reset command will return the cluster to the PENDING state.

REMOTE_CLUSTER_IDINTEGERThe DR ID of the other DR cluster, or -1 if not available (for example, when DR is disabled or communication has not begun).

EXPORT — Returns a separate row for each export stream per partition.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
PARTITION_IDINTEGERThe numeric ID for the logical partition.
SOURCESTRINGThe name of the export stream.
TARGETSTRINGThe name of the export target.
ACTIVESTRING

Whether this site is currently actively exporting data. For normal export in a K-safe cluster, only one copy of each partition actively exports data at any given time. Possible values for user export are "TRUE" and "FALSE".

Note that cross datacenter replication (XDCR) uses the export infrastructure to write the DR conflict logs. In this case, all copies of the partition write the logs and the ACTIVE column is marked as "XDCR" to distinguish it from user-defined export streams.

TUPLE_COUNTBIGINTThe number of records successfully written to the target.
TUPLE_PENDINGBIGINTThe number of records either waiting to be written or to be confirmed by the target.
LAST_QUEUED_TIMESTAMPBIGINTThe timestamp when the most recent tuple was added to the export queue for this partition (in milliseconds).
LAST_ACKED_TIMESTAMPBIGINTThe timestamp when the last tuple was acknowledged as received by the target (in milliseconds).
AVERAGE_LATENCYBIGINTThe average time between when records are inserted and they are acknowledged by the target.
MAXIMUM_LATENCYBIGINTThe maximum time between when a record was inserted and it was acknowledged by the target.
QUEUE_GAPBIGINTThe number of records missing from the queue for the current stream and partition.
STATUSSTRING

The current status of the export connection. Possible values are the following:

  • ACTIVE — Queue is currently exporting to the target

  • BLOCKED — There is a gap in the queue and export is waiting to see if the missing records become available when a missing node rejoins

  • DROPPED — either the source stream has been dropped from the schema or the export configuration has been removed from the configuration and queue is draining any remaining records

Note that if the queue is blocked, the voltadmin export release command returns the queue to the ACTIVE state.

IMPORT — Returns a separate row for each import stream and each server.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
IMPORTER_NAMESTRINGThe name of the import stream.
PROCEDURE_NAMESTRINGThe name of the stored procedure invoked by the import stream to insert the incoming data.
SUCCESSESBIGINTThe number of import transactions that succeeded.
FAILURESBIGINTThe number of import transactions that failed.
OUTSTANDING​_REQUESTSBIGINTThe number of records read from the import stream and waiting to be inserted into the database.
RETRIESBIGINTThe number of attempts to replay failed transactions.

INDEX — Returns a row for every index in every execution site.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDBIGINTNumeric ID of the execution site on the host node.
PARTITION_IDBIGINTThe numeric ID for the logical partition that this site represents. When using a K value greater than zero, there are multiple copies of each logical partition.
INDEX_NAMESTRINGThe name of the index.
TABLE_NAMESTRINGThe name of the database table to which the index applies.
INDEX_TYPESTRING

A text string identifying the type of the index as either a hash or tree index and whether it is unique or not. Possible values include the following:

CompactingHashMultiMapIndex
CompactingHashUniqueIndex
CompactingTreeMultiMapIndex
CompactingTreeUniqueIndex
IS_UNIQUETINYINTA byte value specifying whether the index is unique (1) or not (0).
IS_COUNTABLETINYINTA byte value specifying whether the index maintains a counter to optimize COUNT(*) queries.
ENTRY_COUNTBIGINTThe number of index entries currently in the partition.
MEMORY_ESTIMATEBIGINTThe estimated amount of memory (in kilobytes) consumed by the current index entries.

INITIATOR — Returns a separate row for each connection and the stored procedures initiated by that connection.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
CONNECTION_IDBIGINTNumeric ID of the client connection invoking the procedure.
CONNECTION_HOST​NAMESTRINGThe server name of the node from which the client connection originates. In the case of import procedures, the name of the importer is reported here.
PROCEDURE_NAMESTRINGThe name of the stored procedure. If import is enabled, import procedures are included as well.
INVOCATIONSBIGINTThe number of times the stored procedure has been invoked by this connection on this host node.
AVG_EXECUTION_TIMEINTEGERThe average length of time (in milliseconds) it took to execute the stored procedure.
MIN_EXECUTION_TIMEINTEGERThe minimum length of time (in milliseconds) it took to execute the stored procedure.
MAX_EXECUTION_TIMEINTEGERThe maximum length of time (in milliseconds) it took to execute the stored procedure.
ABORTSBIGINTThe number of times the procedure was aborted.
FAILURESBIGINTThe number of times the procedure failed unexpectedly. (As opposed to user aborts or expected errors, such as constraint violations.)

IOSTATS — Returns one row for every client connection on the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CONNECTION_IDBIGINTNumeric ID of the client connection invoking the procedure.
CONNECTION_HOST​NAMESTRINGThe server name of the node from which the client connection originates.
BYTES_READBIGINTThe number of bytes of data sent from the client to the host.
MESSAGES_READBIGINTThe number of individual messages sent from the client to the host.
BYTES_WRITTENBIGINTThe number of bytes of data sent from the host to the client.
MESSAGES_WRITTENBIGINTThe number of individual messages sent from the host to the client.

LATENCY — Returns a row for every server in the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp, in milliseconds, when the data was collected (not when the call was processed). If two calls to this selector return the same timestamp, the data being returned is identical.
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
INTERVALINTEGERThe length of the measurement interval, in milliseconds. The interval is five seconds (5000).
COUNTINTEGERThe total number of transactions during the interval.
TPSINTEGERThe number of transactions per second during the interval.
P50BIGINTThe 50th percentile latency, in microseconds. This value measures the median latency.
P95BIGINTThe 95h percentile latency, in microseconds.
P99BIGINTThe 99th percentile latency, in microseconds.
P99.9BIGINTThe 99.9th percentile latency, in microseconds.
P99.99BIGINTThe 99.99th percentile latency, in microseconds.
P99.999BIGINTThe 99.999th percentile latency, in microseconds.
MAXBIGINTThe maximum latency during the interval, in microseconds.

LIVECLIENTS — Returns a row for every client connection currently active on the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
CONNECTION_IDBIGINTNumeric ID of the client connection invoking the procedure.
CLIENT_HOSTNAMESTRINGThe server name of the node from which the client connection originates.
ADMINTINYINTA byte value specifying whether the connection is to the client port (0) or the admin port (1).
OUTSTANDING_​REQUEST_BYTESBIGINTThe number of bytes of data sent from the client currently pending on the host.
OUTSTANDING_​RESPONSE_MESSAGESBIGINTThe number of messages on the host queue waiting to be retrieved by the client.
OUTSTANDING_​TRANSACTIONSBIGINTThe number of transactions (that is, stored procedures) initiated on behalf of the client that have yet to be completed.

MEMORY — Returns a row for every server in the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
RSSINTEGERThe current resident set size. That is, the total amount of memory allocated to the VoltDB processes on the server.
JAVAUSEDINTEGERThe amount of memory (in kilobytes) allocated by Java and currently in use by VoltDB.
JAVAUNUSEDINTEGERThe amount of memory (in kilobytes) allocated by Java but unused. (In other words, free space in the Java heap.)
TUPLEDATABIGINTThe amount of memory (in kilobytes) currently in use for storing database records.
TUPLEALLOCATEDBIGINTThe amount of memory (in kilobytes) allocated for the storage of database records (including free space).
INDEXMEMORYBIGINTThe amount of memory (in kilobytes) currently in use for storing database indexes.
STRINGMEMORYBIGINTThe amount of memory (in kilobytes) currently in use for storing string, binary, and geospatial data that is not stored "in-line" in the database record.
TUPLECOUNTBIGINTThe total number of database records currently in memory.
POOLEDMEMORYBIGINTThe total size of memory (in kilobytes) allocated for tasks other than database records, indexes, and strings. (For example, pooled memory is used for temporary tables while processing stored procedures.)
PHYSICALMEMORYBIGINTThe total size of physical memory (in kilobytes) on the server.
JAVAMAXHEAPINTEGERThe maximum heap size (in kilobytes) of the Java runtime environment.

PARTITIONCOUNT — Returns one row identifying the total number of partitions and the host that provided that information.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
PARTITION_COUNTINTEGERThe number of unique or logical partitions on the cluster. When using a K value greater than zero, there are multiple copies of each logical partition.

PLANNER — Returns a row for every planner cache. That is, one cache per execution site, plus one global cache per server. (The global cache is identified by a site and partition ID of minus one.)

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
PARTITION_IDINTEGERThe numeric ID for the logical partition that this site represents. When using a K value greater than zero, there are multiple copies of each logical partition.
CACHE1_LEVELINTEGERThe number of query plans in the level 1 cache.
CACHE2_LEVELINTEGERThe number of query plans in the level 2 cache.
CACHE1_HITSBIGINTThe number of queries that matched and reused a plan in the level 1 cache.
CACHE2_HITSBIGINTThe number of queries that matched and reused a plan in the level 2 cache.
CACHE_MISSESBIGINTThe number of queries that had no match in the cache and had to be planned from scratch
PLAN_TIME_MINBIGINTThe minimum length of time (in nanoseconds) it took to complete the planning of ad hoc queries.
PLAN_TIME_MAXBIGINTThe maximum length of time (in nanoseconds) it took to complete the planning of ad hoc queries.
PLAN_TIME_AVGBIGINTThe average length of time (in nanoseconds) it took to complete the planning of ad hoc queries.
FAILURESBIGINTThe number of times planning for an ad hoc query failed.

PROCEDURE — Returns a row for every stored procedure that has been executed on the cluster, grouped by execution site.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
PARTITION_IDINTEGERThe numeric ID for the logical partition that this site represents. When using a K value greater than zero, there are multiple copies of each logical partition.
PROCEDURESTRINGThe class name of the stored procedure.
INVOCATIONSBIGINTThe total number of invocations of this procedure at this site.
TIMED_INVOCATIONSBIGINTThe number of invocations used to measure the minimum, maximum, and average execution time.
MIN_EXECUTION_TIMEBIGINTThe minimum length of time (in nanoseconds) it took to execute the stored procedure.
MAX_EXECUTION_TIMEBIGINTThe maximum length of time (in nanoseconds) it took to execute the stored procedure.
AVG_EXECUTION_TIMEBIGINTThe average length of time (in nanoseconds) it took to execute the stored procedure.
MIN_RESULT_SIZEINTEGERThe minimum size (in bytes) of the results returned by the procedure.
MAX_RESULT_SIZEINTEGERThe maximum size (in bytes) of the results returned by the procedure.
AVG_RESULT_SIZEINTEGERThe average size (in bytes) of the results returned by the procedure.
MIN_PARAMETER​_SET_SIZEINTEGERThe minimum size (in bytes) of the parameters passed as input to the procedure.
MAX_PARAMETER​_SET_SIZEINTEGERThe maximum size (in bytes) of the parameters passed as input to the procedure.
AVG_PARAMETER​_SET_SIZEINTEGERThe average size (in bytes) of the parameters passed as input to the procedure.
ABORTSBIGINTThe number of times the procedure was aborted.
FAILURESBIGINTThe number of times the procedure failed unexpectedly. (As opposed to user aborts or expected errors, such as constraint violations.)
TRANSACTIONALTINYINT0 or 1. Reserved for future use.

PROCEDUREDETAIL — Returns a row for every statement in every stored procedure that has been executed on the cluster, grouped by execution site.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
PARTITION_IDINTEGERThe numeric ID for the logical partition that this site represents. When using a K value greater than zero, there are multiple copies of each logical partition.
PROCEDURESTRINGThe class name of the stored procedure.
STATEMENTSTRINGThe name of the statement in the stored procedure. Cumulative statistics for all statements in the procedure are included in a separate row labeled "<ALL>".
INVOCATIONSBIGINTThe total number of invocations of the statement at this site.
TIMED_INVOCATIONSBIGINTThe number of invocations used to measure the minimum, maximum, and average execution time.
MIN_EXECUTION_TIMEBIGINTThe minimum length of time (in nanoseconds) it took to execute the statement.
MAX_EXECUTION_TIMEBIGINTThe maximum length of time (in nanoseconds) it took to execute the statement.
AVG_EXECUTION_TIMEBIGINTThe average length of time (in nanoseconds) it took to execute the statement.
MIN_RESULT_SIZEINTEGERThe minimum size (in bytes) of the results returned by the statement.
MAX_RESULT_SIZEINTEGERThe maximum size (in bytes) of the results returned by the statement.
AVG_RESULT_SIZEINTEGERThe average size (in bytes) of the results returned by the statement.
MIN_PARAMETER​_SET_SIZEINTEGERThe minimum size (in bytes) of the parameters passed as input to the statement.
MAX_PARAMETER​_SET_SIZEINTEGERThe maximum size (in bytes) of the parameters passed as input to the statement.
AVG_PARAMETER​_SET_SIZEINTEGERThe average size (in bytes) of the parameters passed as input to the statement.
ABORTSBIGINTIn the cumulative row for each procedure ("<ALL>"), the number of times the procedure was aborted. For individual statements, this column is set to zero.
FAILURESBIGINTThe number of times the statement failed unexpectedly. (As opposed to user aborts or expected errors, such as constraint violations.)

PROCEDUREINPUT — Returns a row for every stored procedure that has been executed on the cluster, summarized across the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
PROCEDURESTRINGThe class name of the stored procedure.
WEIGHTED_PERCBIGINTA weighted average expressed as a percentage of the parameter set size for invocations of this stored procedure compared to all stored procedure invocations.
INVOCATIONSBIGINTThe total number of invocations of this procedure.
MIN_PARAMETER​_SET_SIZEBIGINTThe minimum parameter set size in bytes.
MAX_PARAMETER​_SET_SIZEBIGINTThe maximum parameter set size in bytes.
AVG_PARAMETER​_SET_SIZEBIGINTThe average parameter set size in bytes.
TOTAL_PARAMETER​_SET_SIZE_MBBIGINTThe total input for all invocations of this stored procedure measured in megabytes.

PROCEDUREOUTPUT — Returns a row for every stored procedure that has been executed on the cluster, summarized across the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
PROCEDURESTRINGThe class name of the stored procedure.
WEIGHTED_PERCBIGINTA weighted average expressed as a percentage of the result set size returned by invocations of this stored procedure compared to all stored procedure invocations.
INVOCATIONSBIGINTThe total number of invocations of this procedure.
MIN_RESULT_SIZEBIGINTThe minimum result set size in bytes.
MAX_RESULT_SIZEBIGINTThe maximum result set size in bytes.
AVG_RESULT_SIZEBIGINTThe average result set size in bytes.
TOTAL_RESULT​_SIZE_MBBIGINTThe total output returned by all invocations of this stored procedure measured in megabytes.

PROCEDUREPROFILE — Returns a row for every stored procedure that has been executed on the cluster, summarized across the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
PROCEDURESTRINGThe class name of the stored procedure.
WEIGHTED_PERCBIGINTA weighted average expressed as a percentage of the execution time for this stored procedure compared to all stored procedure invocations.
INVOCATIONSBIGINTThe total number of invocations of this procedure.
AVGBIGINTThe average length of time (in nanoseconds) it took to execute the stored procedure.
MINBIGINTThe minimum length of time (in nanoseconds) it took to execute the stored procedure.
MAXBIGINTThe maximum length of time (in nanoseconds) it took to execute the stored procedure.
ABORTSBIGINTThe number of times the procedure was aborted.
FAILURESBIGINTThe number of times the procedure failed unexpectedly. (As opposed to user aborts or expected errors, such as constraint violations.)

QUEUE — Returns a separate row for each partition and host listing the current state of the process queue for that execution site.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDINTEGERNumeric ID of the execution site on the host node.
CURRENT_DEPTHINTEGERThe number of tasks currently in the queue.
POLL_COUNTBIGINTThe number of tasks that left the queue (and started executing) in the past five seconds.
AVG_WAITBIGINTThe average length of time (in microseconds) tasks were waiting in the queue in the last five seconds.
MAX_WAITBIGINTThe maximum length of time (in microseconds) tasks were waiting in the queue in the last five seconds.

REBALANCE — Returns one row if the cluster is rebalancing. No data is returned if the cluster is not rebalancing.

NameDatatypeDescription
TOTAL_RANGESBIGINTThe total number of partition segments to be migrated.
PERCENTAGE_MOVEDFLOATThe percentage of the total segments that have already been moved.
MOVED_ROWSBIGINTThe number of rows of data that have been moved.
ROWS_PER_SECONDFLOATThe average number of rows moved per second.
ESTIMATED​_REMAININGBIGINTThe estimated time remaining until the rebalance is complete, in milliseconds.
MEGABYTES_PER​_SECONDFLOATThe average volume of data moved per second, measured in megabytes.
CALLS_PER_SECONDFLOATThe average number of rebalance work units, or transactions, executed per second.
CALLS_LATENCYFLOATThe average execution time for rebalance transactions, in milliseconds.

SNAPSHOTSTATUS — Returns a row for every snapshot file in the recent snapshots performed on the cluster.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDINTEGERNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
TABLESTRINGThe name of the database table whose data the file contains.
PATHSTRINGThe directory path where the snapshot file resides.
FILENAMESTRINGThe file name.
NONCESTRINGThe unique identifier for the snapshot.
TXNIDBIGINTThe transaction ID of the snapshot.
START_TIMEBIGINTThe timestamp when the snapshot began (in milliseconds).
END_TIMEBIGINTThe timestamp when the snapshot was completed (in milliseconds).
SIZEBIGINTThe total size, in bytes, of the file.
DURATIONBIGINTThe length of time (in seconds) it took to complete the snapshot.
THROUGHPUTFLOATThe average number of bytes per second written to the file during the snapshot process.
RESULTSTRINGString value indicating whether the writing of the snapshot file was successful ("SUCCESS") or not ("FAILURE").
TYPESTRING

String value indicating how the snapshot was initiated. Possible values are:

  • AUTO — an automated snapshot as defined by the configuration file

  • COMMANDLOG — a command log snapshot

  • MANUAL — a manual snapshot initiated by a user

TABLE — Returns a row for every table, per partition. In other words, the number of tables, multiplied by the number of sites per host and the number of hosts.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
HOST_IDBIGINTNumeric ID for the host node.
HOSTNAMESTRINGServer name of the host node.
SITE_IDBIGINTNumeric ID of the execution site on the host node.
PARTITION_IDBIGINTThe numeric ID for the logical partition that this site represents. When using a K value greater than zero, there are multiple copies of each logical partition.
TABLE_NAMESTRINGThe name of the database table.
TABLE_TYPESTRINGThe type of the table. Values returned include "PersistentTable" for normal data tables and views and "StreamedTable" for streams.
TUPLE_COUNTBIGINTThe number of rows currently stored for this table in the current partition. For streams, the cumulative total number of rows inserted into the stream.
TUPLE_ALLOCATED​_MEMORYBIGINTThe total size of memory, in kilobytes, allocated for storing inline data associated with this table in this partition. The allocated memory can exceed the currently used memory (TUPLE_DATA_MEMORY). For streams, this field identifies the amount of memory currently in use to queue export data (both in memory and as export overflow) prior to its being passed to the export target.
TUPLE_DATA_MEMORYBIGINTThe total memory, in kilobytes, used for storing inline data associated with this table in this partition. The total memory used for storing data for this table is the combination of memory used for inline (tuple) and non-inline (string) data.
STRING_DATA​_MEMORYBIGINTThe total memory, in kilobytes, used for storing non-inline variable length data (VARCHAR, VARBINARY, and GEOGRAPHY) associated with this table in this partition. The total memory used for storing data for this table is the combination of memory used for inline (tuple) and non-inline (string) data.
TUPLE_LIMITINTEGERThe row limit for this table. Row limits are optional and are defined in the schema as a maximum number of rows that any partition can contain. If no row limit is set, this value is null.
PERCENT_FULLINTEGERThe percentage of the row limit currently in use by table rows in this partition. If no row limit is set, this value is zero.

TTL — Returns a separate row for each table in the database where TTL processing is currently active. It does not list tables that do not have TTL defined or where TTL processing has been cancelled due to an error or lack of a suitable index.

NameDatatypeDescription
TIMESTAMPBIGINTThe timestamp when the information was collected (in milliseconds).
TABLE_NAMESTRINGThe name of the table.
ROWS_DELETEDBIGINTThe total number of rows expired and deleted by the TTL attribute.
ROWS_DELETED​_LAST​_ROUNDBIGINTThe number of rows expired and deleted during the last TTL processing.
ROWS_REMAININGBIGINTThe number of expired rows not deleted during the last TTL processing due to batch size limits. If TTL processing is keeping up with the throughput, this value should tend towards zero.
LAST_DELETE​_TIMESTAMPBIGINTThe timestamp when the last round of TTL processing occurred (in milliseconds).

Examples

The following example uses @Statistics to gather information about the distribution of table rows within the cluster:

$ sqlcmd
1> exec @Statistics TABLE, 0;

The next program example shows a procedure that collects and displays the number of transactions (i.e. stored procedures) during a given interval, by setting the delta-flag to a non-zero value. By calling this procedure iteratively (for example, every five minutes), it is possible to identify fluctuations in the database workload over time (as measured by the number of transactions processed).

void measureWorkload() {
  VoltTable[] results = null;
  String procName;
  int procCount = 0;
  int sysprocCount = 0;

  try { results = client.callProcedure("@Statistics",
                  "INITIATOR",1).getResults(); }
  catch (Exception e) { e.printStackTrace(); }

  for (VoltTable t: results) { 
     for (int r=0;r<t.getRowCount();r++) {
         VoltTableRow row = t.fetchRow(r);
         procName = row.getString("PROCEDURE_NAME");
                /* Count system procedures separately */
         if (procName.substring(0,1).compareTo("@") == 0)
           { sysprocCount += row.getLong("INVOCATIONS"); }
         else 
           { procCount += row.getLong("INVOCATIONS"); }
     }
  }
  System.out.printf("System procedures: %d\n" +
                    "User-defined procedures: %d\n",+
                    sysprocCount,procCount);
}