page137
120
The named attribute is not important so long as the attribute exists on the target
table. Both table name and attribute name are case insensitive as I show later.
The query should return 9,398 micro-partitions.
You can also use
system$clustering_information
to derive the micro-partition
count for an object:
SELECT system$clustering_information ( 'LINEITEM_BASELINE', '(L_
LINENUMBER)' );
The query should return a single row containing a JSON record. Look for an attribute
named
total_partition_count
.
Alternatively, run this query to extract the
total_partition_count
:
SELECT parse_json(system$clustering_information ( 'lineitem_baseline', '(l_
shipdate)' )):total_partition_count;
in the previous examples, the table attribute must be enclosed by parenthesis, i.e.,
(L_COMMENT)
; otherwise, the query fails.
As you can see from both sample queries, this is a single-table approach to
identifying micro-partitions.
You can find more information on
system$clustering_depth
and
system$clustering_information
at
https://docs.snowflake.com/en/sql-
reference/functions/system_clustering_depth
and
https://docs.snowflake.com/
en/sql-reference/functions/system_clustering_information
.
Time Sensitivity
Some of the SQL statements in this section are time sensitive. The ability to undrop
objects and view how storage transitions from
active_GB
to
time_travel_GB
and then to
fail_safe_GB
are all dependent upon the following:
•
The data retention period set at the database and/or object level
•
Account Usage Store view latency
•
Elapsed time between issuing commands
ChaPTer 4
MiCro-ParTiTionS