LASTSTATEMENT System Table Description

Description

A pseudo table. The LASTSTATEMENT table presents statistics for the last statement executed on this client’s connection to a given NuoDB Transaction Engine (TE). The statistics are available only immediately after the execution of a statement. Only SELECT and DML statements (INSERT, UPDATE, DELETE, or REPLACE) will update the SYSTEM.LASTSTATEMENT table.

Fields

Field Type Description

ID

bigint

A unique identifier for the statement.

EXECTIME

bigint

The server execution time in microseconds. This does not include compilation and optimization time. For SELECT statements this will include the time until the result set is emptied on the server. So if multiple trips to the server are required for a large result set, and other processing is happening that may not be involved with the query, this will be included in the elapsed time.

COMPILETIME

bigint

The statement compilation time in microseconds. This includes any optimization time.

PEAKMEMUSAGE

bigint

The peak amount of memory allocated during the execution of the statement.

INDEXHITS

bigint

The number of records fetched while scanning indexes if indexes are used. This value will include records/rows that may not be visible according to MVCC visibility rules. If an index is not used, this value will be 0.

INDEXFETCHES

bigint

The number of records fetched while scanning the index. This value will only include records/rows that are visible according to MVCC visibility rules. If an index is not used, this value will be 0.

EXHAUSTIVEFETCHES

bigint

The number of records fetched via the exhaustive scan of tables when no index is used.

INDEXBATCHFETCHES

bigint

The number of batches used to fetch records scanning the index.

EXHAUSTIVEBATCHFETCHES

bigint

The number of batches used to fetch records via the exhaustive scan of tables when no index is used.

RECORDSFETCHED

bigint

The total number of records fetched from tables and indices. This value is equal to the sum of INDEXFETCHES and EXHAUSTIVEFETCHES.

RECORDSRETURNED

bigint

The total number of records in the result set.

INSERTS

bigint

The number of inserted records. This number is greater than or equal to 0 for INSERT statements and 0 otherwise.

UPDATES

bigint

The number of updated records. This number is greater than or equal to 0 for UPDATE statements and 0 otherwise.

DELETIONS

bigint

The number of deleted records. This number is greater than or equal to 0 for DELETE statements and 0 otherwise.

REPLACES

bigint

The number of records affected by the REPLACE statement. It can result in records being inserted or updated and the corresponding counters above are also set.

RECORDSSORTED

bigint

The number of records sorted.

UPDATECOUNT

bigint

The total number of records modified by a DML statement (INSERT, UPDATE, DELETE, or REPLACE).

EVICTED

bigint

The number of rows that didn’t pass a Boolean sieve in a query. In the case of an exhaustive table scan, this is the number of rows that did not match one or more WHERE clauses when the entire table was scanned. In the case of an index scan, this is the number of rows that were returned by the index scan but still did not pass through the WHERE clause.

LOCKED

bigint

The number of rows that were locked during the execution of the query. Typically, this is useful for SELECT …​ FOR UPDATE queries. UPDATE queries lock records only when the isolation level is READ_COMMITTED.

REJECTEDINDEXHINTS

bigint

The number of index entries that were skipped because they did not satisfy the condition that was pushed down to the index scan.

DISKSPILL

boolean

Indicates whether disk spill was used during the statement execution. The value TRUE indicates that disk spill was used.

ISREOPTIMIZED

boolean

Indicates whether the last statement was reoptimized or not. The value TRUE indicates that the last statement was reoptimized.

Indexes

None