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


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 bigintTransaction id being committed.
node integer Node number. -1 is the leader node.
startqueue timestampStart of queueing for commit.
startwork timestampStart of commit.
endflush timestampEnd of dirty block flush phase.
endstagetimestampEnd of metadata staging phase.
endlocaltimestampEnd of local commit phase.
startglobal timestampStart of global phase.
endtime timestampEnd of the commit.
queuelen bigintNumber of transactions that were ahead of this transaction in the commit queue.
permblocks bigintNumber of existing permanent blocks at the time of this commit.
newblocks bigintNumber 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 bigintNumber of block headers that had to be written as part of this commit.
numxidsintegerThe number of active DML transactions.
oldestxidbigintThe XID of the oldest active DML transaction.
extwritelatencybigintThis information is for internal use only.
metadatawrittenintThis information is for internal use only.

Sample Query

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