Redshift Distribution Key Optimization
A company uses Amazon Redshift for analytics. The data engineering team wants to improve query performance for frequently used aggregate queries. Which TWO actions would help achieve this?
⚠ Common exam trap
A common mix-up: candidates confuse VACUUM (which reclaims space) with performance optimization for queries, or assume adding nodes always improves query speed without considering the overhead of data redistribution.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use distribution keys to collocate data on the same node slices
Option B is correct because choosing an appropriate distribution key collocates matching rows on the same node slices, so joins and aggregations can be processed locally without expensive data redistribution (broadcast or shuffle) across the cluster, directly speeding up frequently used aggregate queries. Option D is correct because defining appropriate sort keys physically orders data on disk by the key columns, enabling zone maps to skip irrelevant blocks and allowing efficient range-restricted scans and merge joins, which reduces the data read for aggregate queries. Option A is not correct because adding WLM query queues only changes concurrency and memory allocation among query groups; it does not by itself make an individual aggregate query faster. Option C is not correct because VACUUM reclaims space from deleted rows and re-sorts data, which is a maintenance operation rather than a design change that improves aggregate query performance. Option E is not correct because adding nodes increases cluster capacity and parallelism but does not address the underlying data layout, so poorly distributed or unsorted tables can still cause slow aggregate queries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the number of WLM query queues
Why it's wrong here
Adding WLM query queues changes concurrency and memory allocation between workload groups, governing scheduling rather than aggregate computation. It is correct when separating mixed workloads to prevent resource contention, not for speeding up frequently used aggregate queries.
- ✓
Use distribution keys to collocate data on the same node slices
Why this is correct
Distribution keys determine which node slice stores each row, so collocating joined or aggregated rows on the same slice lets Redshift perform local joins and partial aggregation, cutting data movement across the network during aggregate queries.
- ✗
Run the VACUUM command to reclaim space from deleted rows
Why it's wrong here
VACUUM reclaims storage and re-sorts rows after deletes or loads, which aids scan efficiency generally but does not restructure data for aggregate queries. It is the right action after heavy delete or update activity to restore sorted order and free space.
- ✓
Define appropriate sort keys on the tables
Why this is correct
Sort keys store rows in sorted order on disk, enabling zone maps to skip irrelevant blocks during range-restricted scans. Aggregate queries filtering on the sort column therefore read far fewer blocks, reducing I/O and improving performance.
- ✗
Increase the number of nodes in the cluster
Why it's wrong here
Adding nodes increases cluster storage and compute capacity for concurrent workloads, but does not change how aggregate queries are executed. It is correct when existing nodes are saturated by data volume or concurrent query load, not for accelerating repeated aggregations.
Go deeper
Related to this question
About these practice questions
One of 1,321 original DEA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on DEA-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company uses Amazon Redshift for analytics. They notice that some queries are slow due to data redistribution. The data engineer wants to minimize data movement across nodes. Which table design strategy should be used? (Choose TWO.)
hard- A.Set the distribution style to AUTO for all tables.
- B.Define compound sort keys on frequently filtered columns.
- ✓ C.Choose a distribution key that matches the join key for large tables.
- D.Use EVEN distribution for all tables.
- ✓ E.Use distribution style ALL for small dimension tables.
Why C: Option C is correct because choosing a distribution key that matches the join key on large tables colocates matching rows on the same compute node slice, so joins between those tables can be performed locally without broadcasting or redistributing data across nodes. Option E is correct because using distribution style ALL replicates small dimension tables to every node, eliminating the need to redistribute the dimension during joins with large fact tables and thereby minimizing cross-node data movement. Option A is not ideal here because AUTO lets Redshift decide and may still choose EVEN or KEY distribution that results in redistribution for some workloads, rather than guaranteeing join-key alignment. Option B addresses sort keys, which optimize range-restricted scans and merge joins but do not control how rows are distributed across nodes, so they do not directly reduce redistribution. Option D is incorrect because EVEN distribution spreads rows round-robin regardless of join keys, which typically forces data redistribution during joins and can worsen the problem.
Variation 2. A company uses Amazon Redshift for analytics. The data engineer notices that queries are slow and the system is experiencing high disk usage. The engineer suspects that the distribution style is suboptimal. Which action should the engineer take to improve query performance?
hard- A.Convert all tables to use SORTKEY on the most frequently filtered column.
- B.Increase the number of nodes in the cluster to distribute data across more slices.
- ✓ C.Use the DISTSTYLE AUTO setting and analyze query patterns to let Redshift choose.
- D.Set all tables to DISTSTYLE EVEN to distribute data evenly.
Why C: DISTSTYLE AUTO allows Amazon Redshift to automatically assign distribution styles (KEY, EVEN, or ALL) based on query patterns and table size, optimizing data distribution for improved query performance. This is particularly effective when the engineer suspects suboptimal distribution but lacks detailed knowledge of the ideal key, as Redshift analyzes workload patterns to reduce data movement and disk usage.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DEA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DEA-C01 exam.