DESCRIBE TRANSACTION¶
描述 事务,包括开始时间和状态(正在运行、已提交、已回滚)。
DESCRIBE 可以缩写为 DESC。
语法¶
{ DESC | DESCRIBE } TRANSACTION <transaction_id>
参数¶
transaction_id指定要描述的事务的标识符。
transaction_id必须是字面量而非会话变量。
使用说明¶
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.
When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column
type, specifySELECT "type".You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
输出¶
命令的输出包括以下列,它们描述了对象的属性和元数据:
列 |
描述 |
|---|---|
|
事务的唯一标识符。 |
|
运行事务的用户的用户 ID。 |
|
执行事务的用户会话的会话 ID。 |
|
创建事务的日期和时间。 |
|
事务的完成状态,例如:已提交、已回滚或仍在运行。 |
|
事务完成的日期和时间。 |
示例¶
DESC TRANSACTION 1651535571261000000;