Loading Databricks updates...
← All video guides
Delta Lake & Storage

Stop Manual Tuning: Predictive Optimization Explained

Predictive Optimization automatically tunes your Databricks data tables. Instead of manually running OPTIMIZE, VACUUM, LIQUID CLUSTERING, and ANALYZE…

In short

Predictive Optimization automatically tunes your Databricks data tables. Instead of manually running OPTIMIZE, VACUUM, LIQUID CLUSTERING, and ANALYZE commands, Predictive Optimization determines when and how to run each based on your query patterns. It is enabled by default for all Unity Catalog managed tables, natively supporting Delta Lake, Apache Iceberg, Materialized Views, and Streaming Tables (via Lakeflow Spark Declarative Pipelines).

Source: official Databricks documentation · Databricks announcement

Key takeaways

  • Predictive Optimization automatically runs OPTIMIZE, VACUUM, LIQUID CLUSTERING, ANALYZE based on query patterns.
  • Supported on all Unity Catalog managed tables: Delta Lake, Apache Iceberg, Materialized Views, Streaming Tables.
  • Predictive Optimization operations history tracks estimated DBU cost for each operation transparently.
  • Governance Hub embeds dashboards showing optimization operations, costs, and savings (e.g., 3000 vacuums = $100 USD).
  • Auto-TTL (coming soon) automates row deletion via DELETE ROW AFTER syntax on UC managed tables.
  • Enabled by default; configure at account, catalog, schema, or table level for granular control.

Chapters

  • 0:00 — Predictive Optimization: Automatic Table Tuning
  • 0:34 — Core Operations: OPTIMIZE, VACUUM, Liquid Clustering, ANALYZE
  • 1:04 — System Table: predictive_optimization_operations_history
  • 1:35 — Governance Hub: Cost Tracking & Observability Dashboards
  • 2:37 — Auto-TTL: Automatic Row Deletion (Coming Soon)
  • 3:39 — Control Scope: Enable/Disable at Any Level

Frequently asked questions

What does Predictive Optimization automatically manage?

Predictive Optimization automatically runs OPTIMIZE (compact files), VACUUM (delete old files), LIQUID CLUSTERING (optimal columns), and ANALYZE (maintain statistics) based on observed query patterns.

How do you track Predictive Optimization costs?

Query system.storage.predictive_optimization_operations_history to see operation type, catalog, schema, table, and estimated DBU. Governance Hub dashboards summarize optimization operations and cost savings.

What is Auto-TTL and how will it work?

Auto-TTL (coming soon) automates row deletion via DELETE ROW AFTER clause on UC managed tables. Example: 'CREATE TABLE AS... DELETE ROWS AFTER 30 DAYS date_column'.

How is Predictive Optimization enabled or disabled?

Enabled by default for all Unity Catalog managed tables. Disable or enable at account level, then configure per catalog, schema, or table using ALTER commands.

Full transcript

Auto-generated from the video and lightly edited for readability. Timestamps link to the moment in the video.

Show full transcript (13 segments)

0:04I remember I released the first video on this topic on November 2023 and I think it's the right moment to have a new video about it. But first, what's predictive optimization? Well, PO functions as the platform intelligence layer that comes on the top of your lakehouse which going to continuously optimize your data layout, reduce

0:26storage footprint and maintain precise file statistics required for efficient querying on Unity catalog manage tables which means it's supported for delta tables and Apache iceberg tables. And based on the observed usage pattern, predictive optimization will automatically determines when and how to run commands like optimize which going

0:48to compact small files and improve data localology. The vacuum which selects and reference file to control uh storage cost. The automatic liquid clustering which selects automatically or the optimum column or columns for a table. and then analyze which maintains accurate statistics for query planning and data skipping. Those commands are

1:11very important and po will remove the burden from so many developers. And trust me, this is a gamecher. In in addition, if you want to be able to track your uh all the operations that the system did on your behalf, you have a new system table. Let me show you. You have a new system table called in the storage called predictive optimization

1:35operations history. If you query this table, you will see all the operations that did uh run on using this this feature. Gonna find the catalog name, the schema name, the table name, the type of operation, compaction, astering ice, vacuum, and also something very important, the estimated DBU for this

1:57kind for this operation, which means everything is fully transparent to you. Databricks is working towards improving the uh observability. That's why they did release a feature called governance hub where we gonna have many interesting dashboards embedded in the platform to track the usage. For example, over here we can see the optimizations over time.

2:20You can see the summary of all the operation that did run on for example 3,000 operations on the vacuum. The cost was almost 100 USD and were able to vacuum almost 115 terabyte which with of course the estimated safe annually and the same thing we're going to have it for the compaction the clustering and so on. So make sure if

2:43you're interested by the governance hub to reach out to your database representative. And that's not everything. We have a new feature that's going to be unveiled very soon called the uh auto uh TTL. So this new feature, it's an optimization capability that's going to completely automate row deletion. So using this feature, you're going to be able to set up a time to

3:06live directly on a UC manage table. Let's suppose you're going to create a new table. So you will use the same commands create table and then you will need to add this command over here which is delete row number of days after and specify the name of the column. This is for a new table. For an existing table

3:28of course going to run the alter table the name of your table and then add delete rows number of days after a specific specify the column. And of course, if you want to get rid of this feature because no longer need it, you just need to alter table and then drop row deletion. So basically the syntax would be the alter table delete rows number of days after the name of the

3:52column. And this is going to be super super efficient for you in case you want to get rid of some specific rows after a specific time. And to keep and something very important to keep on the top of your mind, predictive optimization is enabled by default for all the workspaces in case it's disabled, you can enable it at the account level or you can also what to do like enable it

4:15at the catalog or the schema level. And of course when you enable something, you can also disable it either at the table level, at the catalog level or the database or schema level. And this is the commands alter catalog. and then disable or enable predictive optimization and so on. Thank you so much and see you soon. In lake

4:38>> rise data seas lake flow streams the flow iceberg and delta lake tables the glow unity catalog governs lake base and strong jinny text SQL MOSA AND CHA PROLONG you quitting co-host light the fire dream scale higher and higher next drop

Official Databricks resources

Related

Databricks Answers

Looking for a quick, source-backed answer? Browse Databricks Answers on Delta Lake & storage optimization — direct, documentation-validated answers to common Databricks questions, curated by Youssef Mrini, Senior Developer Advocate at Databricks.