DESCRIBE LOCKS

Returns a list of locks from across your cluster.

Note

DESCRIBE commands use CPU to increase usability.

Syntax

DESC[RIBE] LOCKS

Output

Parameter

Data Type

Description

statement_id

Displays the statement ID that caused the lock

TEXT

username

Displays the the user that executed the statement

TEXT

server

Displays the the server name

TEXT

port

Displays the the port number

TEXT

locked_object

Displays the the full qualified name of the object being locked, separated with $

TEXT

lockmode

Displays the the locking mode (Inclusive or Exclusive)

TEXT

statement_start_time

Displays the timestamp the statement started

DATETIME

lock_start_time

Displays the timestamp the lock was obtained

DATETIME

statement_string

The SQL syntax that triggered this lock

TEXT

Example

DESCRIBE LOCKS;

Output:

statement_id|username|server      |port|locked_object|lock_mode|statement_start_time|lock_start_time     |statement_string                                                                               |
------------+--------+------------+----+-------------+---------+--------------------+--------------------+-----------------------------------------------------------------------------------------------+
287         |sqream  |192.168.1.91|5000|database$t   |Inclusive| 2019-12-26 00:03:30| 2019-12-26 00:03:30|CREATE OR REPLACE TABLE nba2 AS SELECT "Name" FROM nba WHERE REGEXP_COUNT("Name", '( )+', 8)>1;|

Permissions

This command requires a SUPERUSER permission.