A data engineer must improve SQL query performance on an Amazon Redshift cluster but cannot increase cluster size. Data is distributed with the EVEN distribution style. Some tables are hundreds of GB, others are under 10 MB. Which approach will improve performance given the constraints?
Choose an answer
Tap an option to check your answer.
Correct answer: Use the ALL distribution style for rarely updated small tables. Specify primary and foreign keys for all tables..
Why this is the answer
The correct approach is to use the ALL distribution style for rarely updated small tables and specify primary and foreign keys. The ALL distribution style replicates the entire table to all compute nodes, which eliminates the need for data movement during joins with other tables. This significantly improves query performance for small, frequently joined tables. Specifying primary and foreign keys helps the query optimizer generate more efficient execution plans. Keeping the EVEN distribution style for all tables (Option A) is not optimal because it can lead to data movement during joins, impacting performance, especially for small tables. Using the ALL distribution style for large tables (Option B) is inefficient as it consumes excessive storage and network bandwidth, as large tables would be duplicated across all nodes. Specifying a combination of distribution, sort, and partition keys for all tables (Option D) is too broad and may not be the most effective strategy for all table sizes and access patterns, and Redshift does not support partition keys in the same way as other databases.
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