Schema:

ORGANIZATION_USAGE

For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).

TABLE_DML_HISTORY view

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

Organization Usage performance

When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in Performance (Organization Usage): bound every scan on history views, list columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.

This Organization Usage view can be used to determine the magnitude and effects of the DML operations performed on a table. Note that these DML operations include ones initiated by Snowpipe but exclude operations initiated by background maintenance services (for example, Automatic Clustering, maintenance for materialized views and search optimization).

You can query this view with the QUERY_HISTORY view and the LOAD_HISTORY view to identify the DML operations that have a significant impact. This can help you to identify opportunities for optimization.

In addition, you can query this view with the AUTOMATIC_CLUSTERING_HISTORY view and the SEARCH_OPTIMIZATION_HISTORY view to visualize the relationship between these DML operations and the credits charged for Automatic Clustering and the search optimization service. (These services can be triggered by DML operations.)

Columns

Organization-level columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

Column NameData TypeDescription
START_TIMETIMESTAMP_LTZStart of the time range (on the hour mark) during which the DML operations were performed.
END_TIMETIMESTAMP_LTZEnd of the time range (on the hour mark) during which the DML operations were performed.
TABLE_IDNUMBERInternal/system-generated identifier for the table modified by the DML operations.
TABLE_NAMEVARCHARName of the table modified by the DML operations.
SCHEMA_IDNUMBERInternal/system-generated identifier for the schema that contains the table modified by the DML operations.
SCHEMA_NAMEVARCHARName of the schema that contains the table modified by the DML operations.
DATABASE_IDNUMBERInternal/system-generated identifier for the database that contains the table modified by the DML operations.
DATABASE_NAMEVARCHARName of the database that contains the table modified by the DML operations.
ROWS_ADDEDNUMBERNumber of rows added by DML operations performed by users on the table during the START_TIME and END_TIME window.
ROWS_REMOVEDNUMBERNumber of rows removed by DML operations performed by users on the table during the START_TIME and END_TIME window.
ROWS_UPDATEDNUMBERNumber of rows updated by DML operations performed by users on the table during the START_TIME and END_TIME window.

Usage notes

  • Latency for the view may be up to 8 hours.
  • This view does not include DML operations on hybrid tables.