Information Schema: New columns in output for QUERY_HISTORY, QUERY_HISTORY_BY_* functions

Attention

This behavior change is in the 2024_02 bundle.

For the current status of the bundle, refer to Bundle History.

When this behavior change bundle is enabled, the output of the QUERY_HISTORY , QUERY_HISTORY_BY_* functions includes the following new column(s):

Column name

Data type

Description

TRANSACTION_ID

NUMBER

ID of the transaction that contains the statement or 0 if the statement is not executed within a transaction.

QUERY_ACCELERATION_BYTES_SCANNED

NUMBER

Number of bytes scanned by the query acceleration service.

QUERY_ACCELERATION_PARTITIONS_SCANNED

NUMBER

Number of partitions scanned by the query acceleration service.

QUERY_ACCELERATION_UPPER_LIMIT_SCALE_FACTOR

NUMBER

Upper limit scale factor that a query would have benefited from.

BYTES_WRITTEN_TO_RESULT

NUMBER

Number of bytes written to a result object. For example, select * from ... would produce a set of results in tabular format representing each field in the selection.

In general, the results object represents whatever is produced as a result of the query, and BYTES_WRITTEN_TO_RESULT represents the size of the returned result.

ROWS_WRITTEN_TO_RESULT

NUMBER

Number of rows written to a result object. For CREATE TABLE AS SELECT (CTAS) and all DML operations, this result is 1. The values in the ROWS_INSERTED, ROWS_UPDATED, and ROWS_DELETED columns reflect the number of rows actually inserted, updated, or deleted.

For more information, see ROWS_PRODUCED column deprecated.

ROWS_INSERTED

NUMBER

Number of rows inserted by the query.

QUERY_RETRY_TIME

NUMBER

Total execution time (in milliseconds) for query retries caused by actionable errors. For more information, see Query retry columns.

QUERY_RETRY_CAUSE

VARIANT

Array of error messages for actionable errors. The array contains one error message for each query retry. If there is no query retry, the array is empty. For more information, see Query retry columns.

FAULT_HANDLING_TIME

NUMBER

Total execution time (in milliseconds) for query retries caused by errors that are not actionable. For more information, see Query retry columns.

These columns are added as the last (right-most) columns in the output.

For more information, see also QUERY_HISTORY view (Account Usage): Changes to columns and new columns.

Ref: 1431, 1524, 1540