Blog/Core Platform/Stop Guessing the Best Clustering Key: Automatic Clustering Key Selection Is Now Generally Available
Dec 3, 2026/3 min readCore Platform

Stop Guessing the Best Clustering Key: Automatic Clustering Key Selection Is Now Generally Available

TL;DR

  • Automatic Clustering Key Selection is now generally available in Optima Clustering. It tests different clustering keys and chooses the best one for your workload so you optimize performance, even as workloads change.

Picking a clustering key is one of the most critical optimization decisions on a large table. Pick well and queries skip most of the data. Pick badly and they scan far more than they need to, which makes them slower and pushes your costs up.

Even a good choice may not last. Query patterns change, new teams start hitting the table and the key that worked last quarter could slowly stop working. Someone has to notice, reanalyze the workload and reconfigure the table. On a platform with hundreds of tables, that rarely happens. It’s not practical to revisit hundreds or even thousands of past decisions.

Today we're announcing the general availability of Automatic Clustering Key Selection, a new capability of Optima Clustering. Optima can now analyze your query patterns, select a clustering key for your table and monitor it as query patterns change. Even long after initially applying the automatically chosen clustering keys, if table usage patterns change, Optima can automatically replace your clustering key with a better one.

How Automatic Clustering Key Selection works

You can enable it with one SQL statement:

ALTER TABLE my_table CLUSTER BY AUTO;

You can also set it when you create the table, with CREATE TABLE ... CLUSTER BY AUTO.

From there, Optima looks at how your table is queried, experiments with candidate clustering keys and then applies a clustering key once it has validated performance improvements. If your query patterns shift, Optima re-evaluates whether a better clustering key exists and may adapt accordingly.

Snowflake has been using Optima Clustering internally for several months. On one example table, we set CLUSTER BY AUTO on Sept. 17 and Optima Clustering immediately started testing the candidate clustering key set, which resulted in the percentage of micro-partitions scanned decreasing from 100% to under 20%. Results vary by table and workload.

Figure 1: On this example table, Optima Clustering experimented with a new clustering key starting on September 18th, and the percentage of micropartitions scanned dropped ~80%.
Figure 1: On this example table, Optima Clustering experimented with a new clustering key starting on September 18th, and the percentage of micropartitions scanned dropped ~80%.

How billing for auto-key selection works

Snowflake doesn't bill you during the testing phase. Snowflake only bills once Optima has validated that a candidate clustering key will improve your query performance. If Snowflake did not establish that the new clustering key improved query performance, it would roll back the key or try an alternate clustering key candidate. In this scenario, it did not charge for the associated experimentation costs.

Figure 2: A candidate clustering key was set on the 17th, testing started on the 18th, and Optima committed to the clustering key on the 27th. Snowflake started billing only after the clustering key was applied, on September 27th.
Figure 2: A candidate clustering key was set on the 17th, testing started on the 18th, and Optima committed to the clustering key on the 27th. Snowflake started billing only after the clustering key was applied, on September 27th.

What changes for you

  • No more manual retuning: You don't have to revisit clustering keys every time a workload evolves.
  • No trial and error up front: You don't need to analyze the data before deciding on a key. Optima tests clustering keys and selects the best one.
  • Predictable billing: If Optima Clustering applies a clustering key to your table, Snowflake bills 0.007 credits per newly ingested uncompressed GB (as of December 2026). Learn more by referencing the consumption table.

Get started

Pick a large, currently unclustered table, and run ALTER TABLE ... CLUSTER BY AUTO. Let Snowflake decide if there is a clustering key available that could meaningfully improve performance. To learn more, read our Optima Clustering documentation.

Share this post

Subscribe to our blog newsletter

Get the best, coolest and latest delivered to your inbox each week

Where Data Does More