Account Usage

In the SNOWFLAKE database, the ACCOUNT_USAGE and READER_ACCOUNT_USAGE schemas enable querying object metadata, as well as historical usage data, for your account and all reader accounts (if any) associated with the account.

Overview of Account Usage schemas

ACCOUNT_USAGE:

Views that display object metadata and usage metrics for your account.

In general, these views mirror the corresponding views and table functions in the Snowflake Snowflake Information Schema, but with the following differences:

  • Records for dropped objects are included in each view.
  • Longer retention time for historical usage data.
  • Data latency.

For more details, see Differences Between Account Usage and Information Schema (in this topic). For more details about each view, see ACCOUNT_USAGE Views (in this topic).

READER_ACCOUNT_USAGE:

Views that display object metadata and usage metrics for all the reader accounts that have been created for your account (as a Secure Data Sharing provider).

These views are a small subset of the ACCOUNT_USAGE views that apply to reader accounts. Also, each view in this schema contains an additional READER_ACCOUNT_NAME column for filtering results by reader account.

For more details about each view, see READER_ACCOUNT_USAGE Views (in this topic).

Note that these views are empty if no reader accounts have been created for your account.

Differences between Account Usage and Information Schema

The Account Usage views and the corresponding views (or table functions) in the Snowflake Information Schema utilize identical structures and naming conventions, but with some key differences, as described in this section:

DifferenceAccount UsageInformation Schema
Includes dropped objectsYesNo
Latency of dataFrom 45 minutes to 3 hours (varies by view)None
Retention of historical data1 yearFrom 7 days to 6 months (varies by view/table function)

For more details, see the following sections.

Dropped object records

Account usage views include records for all objects that have been dropped. Many of the views for object types contain an additional DELETED column that displays the timestamp when the object was dropped.

In addition, because objects can be dropped and recreated with the same name, to differentiate between object records that have the same name, the account usage views include ID columns, where appropriate, that display the internal IDs generated and assigned to each record by the system.

If a column for an object name (for example, the TABLE_NAME column) is NULL, that object has been dropped. In this case, the columns for the names and IDs of the parent objects (for example, the DATABASE_NAME and SCHEMA_NAME columns) are also NULL.

Note that in some views, the column for the object name might still contain the name of the object, even if the object has been dropped.

Data latency

Due to the process of extracting the data from Snowflake’s internal metadata store, the account usage views have some natural latency:

  • For most of the views, the latency is 2 hours (120 minutes).
  • For the remaining views, the latency varies between 45 minutes and 3 hours.

For details, see the list of views for each schema (in this topic). Also, note that these are all maximum time lengths; the actual latency for a given view when the view is queried may be less.

In contrast, views/table functions in the Snowflake Information Schema do not have any latency.

Historical data retention

Certain account usage views provide historical usage metrics. The retention period for these views is 1 year (365 days).

In contrast, the corresponding views and table functions in the Snowflake Information Schema have much shorter retention periods, ranging from 7 days to 6 months, depending on the view.

ACCOUNT_USAGE views

The ACCOUNT_USAGE schema contains the following views:

ViewTypeLatency [1]Edition [3]Notes
ACCESS_HISTORYHistorical3 hoursEnterprise Edition (or higher)Data retained for 1 year.
AGGREGATE_ACCESS_HISTORYHistorical3 hoursEnterprise Edition (or higher)Data retained for 1 year.
AGGREGATE_QUERY_HISTORYHistorical3 hours
AGGREGATION_POLICIESObject2 hours
AI_GATEWAY_USAGE_HISTORYHistoricalData retained for 1 year.
ALERT_HISTORYHistorical3 hoursData retained for 1 year.
ANOMALIES_DAILYHistorical3 hoursData retained for 1 year.
APPLICATION_CALLBACK_HISTORYHistorical3 hoursData retained for 1 year.
APPLICATION_CONFIGURATIONSObject3 hoursData retained for 1 year.
APPLICATION_CONFIGURATION_VALUE_HISTORYHistorical3 hoursData retained for 1 year.
APPLICATION_DAILY_USAGE_HISTORYHistorical24 hoursData retained for 1 year.
APPLICATION_REMOTE_OPERATION_HISTORYHistorical1 hourData retained for 1 year.
APPLICATION_SPECIFICATION_STATUS_HISTORYHistorical1 hourData retained for 1 year.
APPLICATION_SPECIFICATIONSHistorical1 hourData for deleted app specifications is retained for 1 year.
ARCHIVE_STORAGE_DATA_RETRIEVAL_USAGE_HISTORYHistorical1 hourData retained for 1 year.
AUTOMATIC_CLUSTERING_HISTORYHistorical3 hoursData retained for 1 year.
BACKUP_OPERATION_HISTORYHistorical6 hoursData retained for 1 year.
BACKUP_POLICIESObject6 hours
BACKUP_SETSObject6 hours
BACKUP_STORAGE_USAGEHistorical6 hoursData retained for 1 year.
BACKUPSObject6 hours
BLOCK_STORAGE_HISTORYHistorical3 hoursData retained for 1 year.
BLOCK_STORAGE_SNAPSHOTSObject3 hours
CATALOG_LINKED_DATABASE_USAGE_HISTORYHistorical3 hoursData retained for 1 year.
CLASS_INSTANCESObject3 hoursData retained for 1 year.
CLASSESObject3 hoursData retained for 1 year.
COLUMN_QUERY_PRUNING_HISTORYHistorical4 hoursData retained for 1 year.
COLUMNSObject90 minutes
COMPLETE_TASK_GRAPHSHistorical45 minutesData retained for 1 year.
COMPUTE_POOLSHistorical3 hoursData retained for 1 year.
CONTACT_REFERENCESObject3 hours
CONTACTSObject3 hours
COPY_FILES_HISTORYHistoricalData retained for 1 year.
COPY_HISTORYHistorical2 hours [2]Data retained for 1 year.
CORTEX_AGENT_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_AI_FUNCTIONS_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_AI_GUARDRAILS_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_AISQL_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_CODE_CLI_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_CODE_SNOWSIGHT_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_ANALYST_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_DOCUMENT_PROCESSING_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_FINE_TUNING_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_FUNCTIONS_QUERY_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_FUNCTIONS_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_PROVISIONED_THROUGHPUT_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_REST_API_RATE_LIMIT_POLICIESObject6 hours
CORTEX_REST_API_USAGE_HISTORYHistoricalData retained for 1 year.
CORTEX_SEARCH_BATCH_QUERY_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CORTEX_SEARCH_DAILY_USAGE_HISTORYHistorical3 hoursData retained for 1 year.
CORTEX_SEARCH_SERVING_USAGE_HISTORYHistorical1 hourData retained for 1 year.
CREDENTIALSObject2 hours
DATA_CLASSIFICATION_HISTORYHistorical3 hoursEnterprise Edition (or higher)Data retained for 1 year.
DATA_CLASSIFICATION_LATESTObject3 hoursEnterprise Edition (or higher)Data retained for as long as the table exists.
DATA_METRIC_FUNCTION_EXPECTATIONSObject30 minutesEnterprise Edition (or higher)
DATA_METRIC_FUNCTION_REFERENCESObject3 hoursEnterprise Edition (or higher)
DATA_MOVEMENT_POLICIESObject2 hours