- Newest
- Most votes
- Most comments
Running the VACUUM command in Amazon Redshift is a very resource-intensive task. Running VACUUM on large tables online with lots of unsorted/deleted rows is not recommended.
Consider the following options instead:
-
[Unload to Amazon S3][1] and then copy back for huge tables. Perform an [elastic resize][2] on your cluster to to two times the node count before performing these steps and revert to the original cluster size after these operations are complete. [1]: https://docs.aws.amazon.com/redshift/latest/dg/t_Unloading_tables.html [2]: https://aws.amazon.com/premiumsupport/knowledge-center/redshift-elastic-resize/
-
Perform a deep copy, that is, create a new table and repopulate it using a bulk insert. Perform an elastic resize on your cluster before performing the deep copy.
- Create a manual snapshot and restore into a new cluster. When this operation is complete, you can choose to delete the original cluster and rename the new cluster. This might be the fastest option (around one to two hours) to remove large number of deleted rows.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 3 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- What happens to Amazon RDS and Amazon Redshift queries that are running during a maintenance window?AWS OFFICIALUpdated 4 months ago