Problem
Predictive optimization does not trigger VACUUM
even though it is enabled and there are old unreferenced files present in the Delta table.
Cause
If the table with predictive optimization enabled has no active usage, predictive optimization does not see this table and previously deleted data.
Solution
Create a new deletion operation to trigger VACUUM
after enabling predictive optimization.
- Commit any operation that could result in unreferenced files to the table, such as
DELETE
orMERGE
. This creates unreferenced file information to pass to predictive optimization as eligible forVACUUM
. - Wait for
deletedFileRetentionDuration
to pass. - Check that
VACUUM
has been executed.
For more information, please review the Predictive optimization for Delta Lake (AWS | Azure) documentation.
Note
Once a table has usage, VACUUM
is triggered seven days after predictive optimization is enabled.