QUERY_ACCELERATION_HISTORY

functionsupportedQueries & DMLEnterprise+

docs.snowflake.com ↗

Information SchemaTable functions

The QUERY_ACCELERATION_HISTORY function is used for querying the query acceleration service history within a specified date range. The information returned includes the credits used for the query acceleration service at the warehouse level for a given time frame. Note This function is generally deprecated in favor of the ACCOUNT_USAGE.QUERY_ACCELERATION_HISTORY view, which provides a more complete data set and supports longer date ranges. The query acceleration service requires Enterprise Edition (or higher). To inquire about upgrading, please contact Snowflake Support.

Syntax

supportedpartialnot supportednot scored

QUERY_ACCELERATION_HISTORY(
      [ DATE_RANGE_START => <constant_expr> ]
      [ , DATE_RANGE_END => <constant_expr> ]
      [ , WAREHOUSE_NAME => '<string>' ] )

Usage notes

Parameters

All the arguments are optional. DATE_RANGE_START => constant_expr , DATE_RANGE_END => constant_expr: The date/time range to display the query acceleration history. For example, if you specify that the start date is 2019-05-03 and the end date 2019-05-05, you will get data for May 3, May 4, and May 5. (The endpoints are included.) If neither a start date nor an end date is specified, the default will be the last 12 hours. If an end date is not specified, but a start date is specified, then CURRENT_DATE at midnight is used as the end of the range. If a start date is not specified, but an end date is specified, then the range starts 12 hours prior to the start of DATE_RANGE_END. WAREHOUSE_NAME => string: Warehouse name. If specified, only shows the history for the specified warehouse. If a warehouse name is not specified, then the results will include history for each warehouse using the query acceleration service.

Output

The function returns the following columns: Column Name | Data Type | Description START_TIME | TIMESTAMP_LTZ | Start of the specified time range in which the service was in use. END_TIME | TIMESTAMP_LTZ | End of the specified time range in which the service was in use. CREDITS_USED | NUMBER | Number of credits used by the service. WAREHOUSE_NAME | TEXT | Name of the warehouse where usage occurred. NUM_FILES_SCANNED | NUMBER | Number of files scanned by the service. NUM_BYTES_SCANNED | NUMBER | Number of bytes scanned by the service.