I would like to know how it reduces spaces. Certain forums mentions it does this by:
- Moving dead tuples to the front of the table. Essentially reusing dead tuples.
- Rebuilds the table and indices. Dead tuples are moved to the end of the table. A second step
vaccum
is required to reclaim the space. (using normal vaccum would just allow reclaimed spaces to be reusable within the table itself, not other tables).
The above two points may work together or contradict each other. This seems to be a popular solution but not well documented. Prefer not to read the perl code directly.
References: