A company has an Amazon Redshift table named Orders that has been used for 6 months with weekly updates and deletes. The table uses an interleaved sort key on a column containing AWS Regions. The company wants to reclaim disk space to avoid running out of storage and also analyze the sort key column. Which Redshift VACUUM command accomplishes both goals?
Choose an answer
Tap an option to check your answer.
Correct answer: VACUUM REINDEX Orders.
Why this is the answer
VACUUM REINDEX Orders is the correct choice because it reclaims disk space by removing deleted rows and also re-sorts the table, which is crucial for maintaining the efficiency of interleaved sort keys. Over time, weekly updates and deletes can lead to significant fragmentation and an unsorted state, especially with interleaved keys. Reindexing ensures the sort key is optimally organized for query performance and storage efficiency. VACUUM FULL Orders reclaims disk space and re-sorts, but it's a more resource-intensive operation that can take longer and is often overkill when the primary concern is the sort key's effectiveness. VACUUM DELETE ONLY Orders only reclaims space from deleted rows and does not address the sort order, which is essential for interleaved sort keys. VACUUM SORT ONLY Orders re-sorts the table but does not reclaim space from deleted rows, failing to meet both requirements.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed