Problem
Predictive optimization does not trigger VACUUM
even though it is enabled and there are old unreferenced files present in the Delta table.
Cause
Predictive optimization cannot see previously deleted data. It starts to collect metrics of unreferenced files only after predictive optimization is enabled.
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.