Schema:

ACCOUNT_USAGE

AUTOMATIC_CLUSTERING_HISTORY view

This Account Usage view can be used to query the Automatic Clustering history. The information returned by the view includes the credits consumed, bytes updated, and rows updated each time a table is reclustered.

Columns

Column NameData TypeDescription
START_TIMETIMESTAMP_LTZStart of the specified time range.
END_TIMETIMESTAMP_LTZEnd of the specified time range.
CREDITS_USEDNUMBERNumber of credits billed for automatic clustering during the START_TIME and END_TIME window.
NUM_BYTES_RECLUSTEREDNUMBERNumber of bytes reclustered during the START_TIME and END_TIME window.
NUM_ROWS_RECLUSTEREDNUMBERNumber of rows reclustered during the START_TIME and END_TIME window.
TABLE_IDNUMBERInternal/system-generated identifier for the table.
TABLE_NAMEVARCHARName of the table.
SCHEMA_IDNUMBERInternal/system-generated identifier for the schema that contains the table.
SCHEMA_NAMEVARCHARName of the schema that contains the table.
DATABASE_IDNUMBERInternal/system-generated identifier for the database that contains the table.
DATABASE_NAMEVARCHARName of the database that contains the table.
INSTANCE_IDNUMBERInternal/system-generated identifier for the instance that the object belongs to.

Usage notes

  • Latency for the view may be up to 180 minutes (3 hours).
  • If you want to reconcile the data in this view with a corresponding view in the ORGANIZATION USAGE schema, you must first set the timezone of the session to UTC. Before querying the Account Usage view, execute:

    ALTER SESSION SET TIMEZONE = UTC;
  • A row might be clustered multiple times, depending on data skew, clustering key distribution, and reordering required for micro-partitions. A large table with poor initial clustering might need multiple passes to reach an optimally clustered state. Therefore, the NUM_ROWS_RECLUSTERED value for a table could be as high as the total number of rows in the table or even higher.