- Schema:
ICEBERG_STORAGE_OPTIMIZATION_HISTORY view¶
Use this Account Usage view to query Iceberg storage optimization jobs, which includes data compaction, within the last 365 days (1 year) for Apache Icebergâ„¢ tables in your account. You can query jobs for the following Iceberg tables:
Snowflake-managed tables
Open Catalog-managed tables
Note
Snowflake starts billing for data compaction of data files for Snowflake-managed Iceberg tables on October 20th, 2025.
To enable or disable data compaction on Snowflake-managed Iceberg tables, see Set data compaction.
Columns¶
Column name |
Data type |
Description |
---|---|---|
START_TIME |
TIMESTAMP_LTZ |
Start of the time range (on the hour mark) during which the operations were performed. |
END_TIME |
TIMESTAMP_LTZ |
End of the time range (on the hour mark) during which the operations were performed. |
CREDITS_USED |
NUMBER |
Number of credits billed for data compaction during the START_TIME and END_TIME window. |
NUM_BYTES_SCANNED |
NUMBER |
Number of bytes scanned during the START_TIME and END_TIME window. |
NUM_ROWS_WRITTEN |
NUMBER |
Number of rows compacted during the START_TIME and END_TIME window. |
TABLE_ID |
NUMBER |
Internal, system-generated identifier for the Iceberg table in Snowflake. |
TABLE_NAME |
VARCHAR |
Name of the Iceberg table defined in Snowflake. |
ICEBERG_TABLE_UUID |
VARCHAR |
Apache Icebergâ„¢ table identifier, generated by the external Iceberg engine or catalog. |
SCHEMA_ID |
VARCHAR |
System-generated identifier for the Snowflake schema that the table is in. |
SCHEMA_NAME |
VARCHAR |
Name of the schema the table is in. |
DATABASE_ID |
NUMBER |
System-generated identifier for the Snowflake database that the schema and table belong to. |
DATABASE_NAME |
VARCHAR |
Name of the database that the schema and table belong to. |
INSTANCE_ID |
NUMBER |
Internal, system-generated identifier for the instance that the object belongs to. |
Usage notes¶
Latency for the view is up to 2 hours.
The view contains historical usage data for the last 365 days.
The USAGE_VIEWER role is granted the SELECT privilege on this view. For more information, see SNOWFLAKE database roles.
This view doesn’t include data compaction information for externally managed Iceberg table that aren’t managed by Open Catalog.
Examples¶
The following example shows how to filter for tables whose number of credits billed is more than a specified amount:
SELECT
table_name,
start_time,
credits_used
FROM SNOWFLAKE.ACCOUNT_USAGE.ICEBERG_STORAGE_OPTIMIZATION_HISTORY
WHERE credits_used > 0.0005
ORDER BY
credits_used DESC;
The query returns the following results:
+------------------+-------------------------------+--------------+
| TABLE_NAME | START_TIME | CREDITS_USED |
+------------------+-------------------------------+--------------+
| my_iceberg_table | 2025-09-15 09:00:00.000 -0700 | 0.000529445 |
| my_iceberg_table | 2025-09-15 08:00:00.000 -0700 | 0.000516791 |
+------------------+-------------------------------+--------------+