The full answer
A full scan usually means Delta Lake cannot skip files for the query's filter. Thanos should check whether the data is laid out by the filtered columns (liquid clustering), whether those columns have statistics, and whether the table has many small files, and then let predictive optimization keep it that way.
First, confirm the cause. Open the query profile in the SQL warehouse's query history. Compare files read with files pruned and look at the filter: a filter on a column that is wrapped in a function (for example date(event_time) = ...) or compared with a different type often prevents skipping.
1. Liquid clustering
Databricks recommends liquid clustering for all new tables, in place of partitioning and Z-ordering. It sorts data by the columns you choose so files hold narrow ranges of them, and Delta can skip the rest.
ALTER TABLE events CLUSTER BY (customer_id, event_date);
OPTIMIZE events FULL; -- recluster existing data once
On Unity Catalog managed tables, CLUSTER BY AUTO lets Databricks choose the keys from the actual query patterns. Liquid clustering cannot be combined with partitioning or ZORDER; partitioned tables need converting first.
2. Statistics for data skipping
Delta stores minimum, maximum and null counts per file when data is written. On external tables only the first 32 columns get statistics by default, so a filter on column 40 skips nothing. Name the needed columns with delta.dataSkippingStatsColumns, then run ANALYZE TABLE events COMPUTE DELTA STATISTICS so existing files get them too. Managed tables with predictive optimization pick statistics columns from real filters automatically.
3. Small files
Thousands of small files slow every query. Run OPTIMIZE, and turn on optimized writes and auto compaction for tables written often in small batches.
4. Predictive optimization
On Unity Catalog managed tables, predictive optimization runs OPTIMIZE, VACUUM and ANALYZE when needed, so the layout does not decay again.
5. Photon and predictive I/O
SQL warehouses run on Photon, whose predictive I/O can skip data on any column. That is why bloom filter indexes, once a common answer here, are now deprecated.
6. The query itself
Select only needed columns, filter on raw column values rather than expressions, and check join order and broadcast joins in the profile.
A good answer starts with the query profile and ends with liquid clustering and predictive optimization, rather than reaching first for ZORDER.
Last updated 16 October 2026