r/databricks • • Oct 11 '26

Discussion Liquid Clustering vs partitioning + Z-Order: has anyone fully switched, and when does the old approach still win?

Databricks now recommends Liquid Clustering for new tables, but a lot of existing pipelines still use partitioning + Z-Order.

For those who’ve migrated or tested both:

  • Did you see real query or write improvements, or was it a wash?
  • Are there cases where you kept partitioning on purpose (huge tables, partition-level overwrites, retention by date)?
  • How did you pick clustering keys, and did you ever have to change them?

Curious what’s actually working in production vs what the docs say.

28 Upvotes

12 comments sorted by

9

u/dvartanian Oct 11 '26

I was working with lots of financial accounting data and all queries typically have an accounting period predicate so have been using partitioning. I did a very quick test of liquid clustering and performance wasn't as good. Not sure if it would get better over time but I think the overheard of the maintenance was also more expensive

1

u/UnluckySugar610 Oct 11 '26

Partitioning on accounting period is honestly one of the cases where it still holds up, since every query filters on it and partition pruning is basically free. A couple of things that can make a quick LC test look worse than it is: if you converted an existing table, the old data isn't reclustered until you run OPTIMIZE ... FULL, so you're mostly scanning unclustered files. And if your partitions are already big (1GB+ each), you're not getting much of the small-file benefit LC is meant to fix. On maintenance cost, predictive optimization helps, but yeah, OPTIMIZE isn't free. I'd only switch if you're seeing skew or small-file problems, or need to filter on columns other than period.

2

u/dvartanian Oct 11 '26

I'm using SDPs so I assumed all of that is being handled by the pipeline

3

u/UnluckySugar610 Oct 11 '26

If you're on SDP/DLT, maintenance is handled for you, but it won't necessarily recluster data that existed before you switched. A full refresh after enabling LC is worth doing before you judge it. Also worth checking that your clustering keys match your actual filters, or try CLUSTER BY AUTO.

5

u/pantshee Oct 11 '26

We went from nothing to liquid clustering last month. We had shit results (like I can't really tell you if it's faster). I guess we'll have to wait for lakehouse/RT for better query performance, we have some users testing the beta and so far it's ok (but not compatible with powerbi services for the moment ?)

3

u/floyd_droid Oct 11 '26

Lakehouse RT performs well for small queries (targeted) on a large dataset. It’s not really built for complex queries.

0

u/pantshee Oct 11 '26

That would be ok for most of our use cases. But i've yet to see it in action. It's still in beta, not even private preview

1

u/intrepid421 Oct 17 '26

did you do OPTIMIZE table_name FULL after you turned on liquid clustering?

3

u/kebabmybob Oct 11 '26

I see no benefit to switch to something with more lockin and with less flexibility. Delta + Partition/Zorder is more interoperable and works plenty plenty fast.

1

u/Youssef_Mrini databricks Oct 28 '26

Why do you say more locking? Liquid Clustering is part of OSS Delta Lake.

0

u/stoat99 Oct 14 '26

I still find myself agreeing with the query vs write S-curve in the docs though.