- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2021 09:26 AM
Optimize -> Vacuum
or
Vacuum -> Optimize
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2021 05:30 PM
I agree with you @Werner Stinckens . I will always do optimize to try to compact the files more (default size is 1 gb) and then run vacuum. Vacuum will remove the old files that are no longer needed or have been marked as obsoleted by the optimize command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2021 09:26 AM
I am asking some questions as nobody is writing today 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2021 09:28 AM
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2021 09:30 AM
In my opinion as Vacuum remove old files so is better to do Vacuum first so there will be less files to optimize but maybe in some cases it will be faster to delete optimized already files (so optimize first) ❔️
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2021 05:17 AM
I optimize first as delta lake knows which files are relevant for the optimize. Like that I have my optimized data available faster. Then a vacuum. Seemed logical to me, but I might be wrong. Never actually thought about it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2021 05:30 PM
I agree with you @Werner Stinckens . I will always do optimize to try to compact the files more (default size is 1 gb) and then run vacuum. Vacuum will remove the old files that are no longer needed or have been marked as obsoleted by the optimize command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 04:04 AM
What about ReOrg delta table https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/delta-reorg-table
Does it help or make sense to add Re-org then Optimize - Vacuum every week?
Reorganize a Delta Lake table by rewriting files to purge soft-deleted data, such as the column data dropped by ALTER TABLE DROP COLUMN.
Does it mean, it only touches the delta logs for deleted columns or data and not the actual data?

