
Explanation:
TRUNCATE is the correct SQL command for removing all rows from a materialized view in Amazon Redshift and immediately reclaiming storage space. Unlike DELETE, which marks rows as deleted and requires a subsequent VACUUM to reclaim space, TRUNCATE performs a non-logged, non-transactional removal that instantly frees the storage — making it the most storage-efficient option.
Ultimate access to all questions.
Question 37.
A data engineer maintains a materialized view that is based on an Amazon Redshift database. The view has a column named load_date that stores the date when each row was loaded. The data engineer needs to reclaim database storage space by deleting all the rows from the materialized view. Which command will reclaim the MOST database storage space?
A
DELETE FROM materialized_view_name where 1=1
B
TRUNCATE materialized_view_name
C
VACUUM table_name where load_date<=current_date materializedview
D
DELETE FROM materialized_view_name where load_date<=current_date
No comments yet.