Removes data files that a table no longer references once they are older than the retention period, 7 days unless changed. Versions older than that can no longer be reached with time travel.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains VACUUM in context, with comparison tables and the common traps.
Terms in this definition
- Event
Table in Log Analytics where entries from Windows event logs are kept.
- Time travel
Delta feature to query an older table version through
TIMESTAMP AS OF,VERSION AS OFor@v. Needs that version's data files and log to still exist.
Related terms
- Lakehouse maintenance activity
Preview pipeline step for scheduled upkeep of lakehouse Delta tables, running OPTIMIZE (optionally with V-Order) followed by VACUUM.
- Lakehouse table maintenance
Running OPTIMIZE (V-Order optional) and VACUUM against a Delta table with no Spark coding, from the Maintenance dialog in lakehouse explorer. The same job can also be triggered by a pipeline activity or through a REST API.
- Predictive optimization
Unity Catalog managed tables can have
OPTIMIZE,VACUUMandANALYZEscheduled and run for them on serverless compute without manual effort. Accounts created on or after 11 November 2024 get this turned on by default. - REORG TABLE
With
REORG TABLE ... APPLY (PURGE), Delta rewrites files so that rows marked as deleted by deletion vectors are actually removed from storage, which is usually done before runningVACUUM. - RESTORE
Puts a Delta table back to how it was at an older point, picked by
TO VERSION AS OForTO TIMESTAMP AS OF. You needMODIFY, and onceVACUUMhas cleared the old files it can't succeed.