# Snowflake Table Low-Benefit Auto-Clustering

> Flags Snowflake tables spending Automatic Clustering credits in 30 days with under 100 queries, priced at the edition credit rate.

Source: https://zop.dev/integrations/snowflake/recommendations/snowflake-table-low-benefit-auto-clustering

---

## Keeping a table sorted costs credits in the background

When a table has a clustering key, [Automatic Clustering](https://docs.snowflake.com/en/user-guide/tables-auto-reclustering)
reclusters it in the background as DML makes the data less ordered, and bills that work in credits.
Clustering Classic charges for the serverless compute used; Optima Clustering, which newly clustered
tables use from September 1, 2026, charges by uncompressed data ingested instead. Snowflake lists the triggers for reclustering activity: a table that is not
optimally clustered, or a changed clustering key. The benefit comes only from queries that prune
micro-partitions using that key.

On a large table that dashboards filter all day, the trade is usually good. On a table written
constantly but queried a few times a month, the credits keep flowing while almost nothing benefits
from the ordering they pay for.

## Clustering credits against query activity

[AUTOMATIC_CLUSTERING_HISTORY](https://docs.snowflake.com/en/sql-reference/account-usage/automatic_clustering_history) shows the
cost side:

```sql
SELECT database_name, schema_name, table_name,
       SUM(credits_used)            AS clustering_credits_30d,
       SUM(num_bytes_reclustered)   AS bytes_reclustered_30d
FROM SNOWFLAKE.ACCOUNT_USAGE.AUTOMATIC_CLUSTERING_HISTORY
WHERE start_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
GROUP BY 1, 2, 3
HAVING SUM(credits_used) > 0
ORDER BY clustering_credits_30d DESC;
```

For the benefit side, count the queries that read each candidate over the same 30 days in
ACCESS_HISTORY (`base_objects_accessed`). The clustering view needs `USAGE_VIEWER` and lags by up to
3 hours; access history needs `GOVERNANCE_VIEWER` and Enterprise Edition.

## Any clustering spend with under 100 queries in 30 days

ZopNight sums the table's Automatic Clustering credits over the last 30 days and requires the total
to be above zero. It then sums the queries against the table in the same window and fires when
there were fewer than 100. The check does not look at clustering depth or at whether the queries
actually filter on the clustering key.

## When the table is left alone

A missing or empty series for either credits or queries means no finding. Tables with 100 or more
queries in the window pass, however much clustering costs, because the rule cannot measure pruning
benefit and leaves heavily used tables to your judgement. No finding is raised when the account's
credit rate is unavailable, since the result would have no price.

## How the saving is priced

Suspending reclustering stops these charges, so the saving is the table's clustering credits at the
account's per-credit rate for its edition, falling back to the Enterprise rate if the edition is
unknown:

```text
saving per month = clustering credits over 30 days x credit rate for the edition
```

## Suspending reclustering

1. Check the few queries that do run. If they filter on the clustering key and scan a large table,
   compare their runtime before and after on a clone before deciding.
2. Suspend: `ALTER TABLE sales.events SUSPEND RECLUSTER;` While suspended, the table is never
   reclustered and incurs no clustering charges.
3. If query patterns change later, `ALTER TABLE sales.events RESUME RECLUSTER;` restarts it.

**Note**
With Optima Clustering, Snowflake applies a catch-up cost on resume for data ingested while
clustering was suspended, so Snowflake advises dropping the clustering key (`ALTER TABLE ... DROP
CLUSTERING KEY`) to stop paying permanently. Changing the clustering key also resumes clustering
automatically.
