Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

STL_COMMIT_STATS

Provides metrics related to commit performance, including the timing of the various stages of commit and the number of blocks committed. Query STL_COMMIT_STATS to determine what portion of a transaction was spent on commit and how much queuing is occurring.

This table is visible only to superusers. For more information, see Visibility of Data in System Tables and Views.

Table Columns

Column Name Data Type Description
xid bigint Transaction id being committed.
node integer Node number. -1 is the leader node.
startqueue timestamp Start of queueing for commit.
startwork timestamp Start of commit.
endflush timestamp End of dirty block flush phase.
endstage timestamp End of metadata staging phase.
endlocal timestamp End of local commit phase.
startglobal timestamp Start of global phase.
endtime timestamp End of the commit.
queuelen bigint Number of transactions that were ahead of this transaction in the commit queue.
permblocks bigint Number of existing permanent blocks at the time of this commit.
newblocks bigint Number of new permanent blocks at the time of this commit.
dirtyblocks bigint Number of blocks that had to be written as part of this commit.
headers bigint Number of block headers that had to be written as part of this commit.
numxids integer The number of active DML transactions.
oldestxid bigint The XID of the oldest active DML transaction.
extwritelatency bigint This information is for internal use only.
metadatawritten int This information is for internal use only.

Sample Query

Copy
select node, datediff(ms,startqueue,startwork) as queue_time, datediff(ms, startwork, endtime) as commit_time, queuelen from stl_commit_stats where xid = 2574 order by node; node | queue_time | commit_time | queuelen -----+--------------+-------------+--------- -1 | 0 | 617 | 0 0 | 444950725641 | 616 | 0 1 | 444950725636 | 616 | 0