The system table information_schema.engine_user_query_history is a view, which is a virtual table based on ENGINE_QUERY_HISTORY. It applies filters to only show queries that were made by actual users.

Queries generated by the system, such as those from connectors, drivers, or SDKs, are marked with the boolean HTTP header Firebolt-Machine-Query. These system queries can include actions such UI page loads or query progress updates. These queries do not appear in information_schema.engine_user_query_history, but are available in ENGINE_QUERY_HISTORY, which acts as a complete audit log.

SELECT
  *
FROM
  information_schema.engine_user_query_history
LIMIT
  100;

Columns in information_schema.engine_user_query_history

Each row contains columns with detailed information about each query in the history. This schema has the same structure and information as ENGINE_QUERY_HISTORY.

Column NameData TypeDescription
account_nameTEXTThe name of the account that ran the query.
user_nameTEXTThe user name used to run the query. The user name is provided for account-level operations but is NULL for organization-level operations.
login_nameTEXTThe login name that was used to run the query. The login_name is provided for organization-level statements, and is otherwise NULL.
service_account_nameTEXTThe service account name that was used to run the query. The service_account_name is provided for organization-level statements, and otherwise NULL.
submitted_timeTIMESTAMPTZThe time that the user submitted the query.
start_timeTIMESTAMPTZThe time that the query started running in Coordinated Universal Time (UTC).
end_timeTIMESTAMPTZThe time that the query stopped running in UTC.
duration_usBIGINTThe duration of query run time in microseconds.
e2e_duration_usBIGINTThe end-to-end duration of query run time. Starting from the time the query was submitted and ending when the result was fully returned in microseconds.
statusTEXTCan be one of the following values:
STARTED_EXECUTION–Successful start of query execution.
ENDED_SUCCESSFULLY–Successful end of query execution.
CANCELED_EXECUTION–Query was canceled.
PARSE_ERROR–Query could not be parsed.
EXECUTION_ERROR–Query could not be executed successfully.
request_idTEXTThe ID of the request from which the query originates.
query_idTEXTThe unique identifier of the SQL query.
query_labelTEXTA user-provided query label.
query_textTEXTThe text of the SQL statement.
query_text_normalizedTEXTThe normalized text of the SQL statement.
query_text_normalized_hashTEXTThe hash of the normalized text of the SQL statement.
error_messageTEXTThe returned error message.
telemetryTEXTDisplays additional telemetry information about the query in JSON format. This data is currently only available for VACUUM queries and jobs.
scanned_rowsBIGINTThe total number of rows scanned.
scanned_bytesBIGINTThe total number of bytes scanned from both cache and storage.
scanned_cache_bytesBIGINTThe total number of compressed bytes scanned from disk-based cache.
scanned_storage_bytesBIGINTThe total number of compressed bytes scanned from Firebolt-managed storage. Does not apply to EXTERNAL tables.
inserted_rowsBIGINTThe total number of rows written.
inserted_bytesBIGINTThe total number of bytes written to both cache and storage.
spilled_bytesBIGINTThe total number of uncompressed bytes spilled.
returned_rowsBIGINTThe total number of rows returned from the query.
returned_bytesBIGINTThe total number of bytes returned from the query.
time_in_queue_usBIGINTThe number of microseconds the query spent in queue.
retriesBIGINTThe number of retried attempts in case of query failure. Defaults to 0.
node_ordinalINTEGERIndex of the node in the cluster that has received the query and manages the execution of it. (1-indexed)
cluster_ordinalINTEGERIndex of the cluster in the engine that has received the query and executes it. (1-indexed)
number_of_clustersINTEGERNumber of cluster in the engine at the point of query execution.