Reputation: 17097
When we delete data from Netezza tables, it is archived (soft delete) and not removed permanently. It is permanently removed and disk space is reclaimed only when you do GROOM.
Why is this? Why can't we have the disk space back immediately and we need to do a GROOM?
Upvotes: 1
Views: 1079
Reputation: 3887
Netezza stores table data by writing compressed rows to 3MB extents on disk. One row may occupy more space than a different row. Because compression is variable,when you delete a row, it is not certain whether any other row can fit entirely within the space left by the deleted. It would be extermely deleterious to performance to determine a row's size first and then hunt for a deleted row's space that would accommodate the new row.
When it comes to reclaiming space from deleted rows, GROOM will, generally speaking, consolidate the remaining undeleted rows from an extent to a new extent (along with any other rows it can pack in), and then reclaim the old extents as free space.
This is at least one reason why space from deleted rows is not immediately available as free space.
Upvotes: 2