SYSTEM$ESTIMATE_AUTOMATIC_CLUSTERING_COSTS

functionsupportedTables, views, streams, sequences

docs.snowflake.com ↗

System functions

Returns estimated costs associated with enabling Automatic Clustering for a table. This function is used to do the following: - Estimate the cost of clustering a table for the first time. - Estimate the cost of changing the cluster key of a table. - Estimate, when possible, the cost associated with maintaining the table after it’s clustered around the specified key. Sometimes, a table might need more DML history to estimate future maintenance costs. Important The cost estimates returned by the SYSTEM$ESTIMATE_AUTOMATIC_CLUSTERING_COSTS function are best efforts. The actual realized costs can vary by up to 100% (or, in rare cases, several times) from the estimated costs.

Syntax

supportedpartialnot supportednot scored

SYSTEM$ESTIMATE_AUTOMATIC_CLUSTERING_COSTS( '<table_name>' ,
 [ '( <expr1> [ , <expr2> ... ] )' ] )

Parameters

NameRequiredDescription
‘table_name’requiredName of the table for which you want to return the estimated cost of clustering.
‘(expr1 [ , expr2 ... ])’requiredThe proposed cluster key for the table is where each expression resolves to a table column. The function estimates the cost of clustering the table using these columns as the cluster key.

Returns

A value of type VARCHAR. The returned string is in JSON format and contains the following name/value pairs:

Usage notes

Access control requirements

The privileges needed to estimate costs are the same as those required to read the table and change the cluster key. You need the following privileges: - SELECT and INSERT privileges on the table, or OWNERSHIP privilege on the table. - USAGE privilege or any other privilege on the parent schema and database.