Skip to main content
You can use the information_schema.engine_running_queries view to return information about queries currently running in a database. This view is available in each database and includes one row for each running query. The table contains a maximum of ten thousand queries per engine cluster. You can use a SELECT query to return information about each running query as shown in the example below.
SELECT
  *
FROM
   information_schema.engine_running_queries
LIMIT
  100;

Columns in information_schema.engine_running_queries

Each row has the following columns with information about each running query.
Column NameData TypeDescription
account_nameTEXTThe name of the account that ran the query.
user_nameTEXTThe user name that was used to run the query. The user_name is present for account-level operations, and NULL for organization-level operations.
login_nameTEXTThe login name that was used to run the query. The login_name is present for organization-level statements, and otherwise NULL.
service_account_nameTEXTThe service account name that was used to run the query. The service_account_name is present for organization-level statements, and otherwise NULL.
cluster_ordinalBIGINTIndex of the cluster in the engine that has received the query and executes it. (1-indexed)
node_ordinalBIGINTIndex of the node in the cluster that has received the query and manages the execution of it. (1-indexed)
submitted_timeTIMESTAMPTZThe time when the query was submitted by a user (UTC)
start_timeTIMESTAMPTZThe query execution start time (UTC).
duration_usBIGINTThe time elapsed in microseconds from <START_TIME> to when the query on information_schema.engine_running_queries returns results.
e2e_duration_usBIGINTThe time elapsed in microseconds from the time of query submission to when the query on information_schema.engine_running_queries returns results.
statusTEXTThe status of the query, eiteher RUNNING, SUSPENDED, or CANCELING.
request_idTEXTThe ID of the request from which the query originates.
query_idTEXTThe query id of this query.
query_labelTEXTUser provided query label (query_label parameter)
query_textTEXTText of the SQL statement.
scanned_rowsBIGINTThe number of rows scanned to return query results.
scanned_bytesBIGINTThe number of bytes scanned from cache and storage.
inserted_rowsBIGINTThe number of rows written
inserted_bytesBIGINTThe number of bytes written.
async_tokenTEXTIf the query is an async query, this handle can be used to check the status via the built in stored procedure fb_GetAsyncStatus(<async_token>).
retriesBIGINTThe total number of retries executed for a given query after a failure (by default, the number of retries is 0 and the number increases with each retry).
telemetryTEXTDisplays additional telemetry information about the query in JSON format. This data is currently only available for VACUUM queries and jobs.