Redshift Query Performance — Sort Keys and Compression Encodings
Which TWO actions can help improve query performance in Amazon Redshift? (Choose two.)
Quick Answer
The answer is to define appropriate sort keys and apply compression encodings to columns. Sort keys improve Amazon Redshift query performance by physically co-locating rows with similar values on disk, which allows the query optimizer to use zone maps to skip irrelevant data blocks during table scans, reducing I/O and speeding up range-restricted queries and merge joins. Compression encodings further reduce storage footprint and the amount of data read from disk, making scans faster. On the AWS Certified Data Engineer Associate DEA-C01 exam, this question tests your understanding of Redshift’s physical design choices; a common trap is to confuse sort keys with distribution keys or to think that compression only saves storage without affecting query speed. Remember the memory tip: “Sort to skip, compress to shrink”—sort keys let you skip blocks, compression shrinks what you read.
⚠ Common exam trap
Watch out — candidates often assume scaling out (adding nodes) always speeds up individual queries, but in Redshift, query performance is more dependent on data layout (sort keys, distribution, compression) than on cluster size, and adding nodes primarily benefits concurrent workloads rather than single-query latency.
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 appropriate sort keys for tables.
Defining appropriate sort keys in Amazon Redshift enables the query optimizer to use zone maps to skip irrelevant data blocks during table scans, significantly reducing the amount of data read from disk. Sort keys also improve the effectiveness of merge joins and the performance of range-restricted queries by physically co-locating rows with similar sort key values on disk.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use appropriate sort keys for tables.
Why this is correct
Sort keys help the query optimizer scan less data.
- ✗
Disable SSL encryption for connections.
Why it's wrong here
Disabling SSL does not improve performance.
- ✗
Use VARCHAR instead of CHAR for fixed-length strings.
Why it's wrong here
Choosing data type is not a primary performance improvement technique.
- ✓
Apply compression encodings to columns.
Why this is correct
Compression reduces storage and I/O, improving performance.
- ✗
Increase the number of nodes in the cluster.
Why it's wrong here
Scaling up may help but is not always the solution and adds cost.
Go deeper
Related to this question
About these practice questions
This DEA-C01 question is part of Courseiva's 1,321-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way 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. Which TWO actions can improve query performance on an Amazon Redshift cluster? (Choose two.)
medium- ✓ A.Define appropriate sort keys
- B.Increase the number of nodes
- C.Use EVEN distribution style for all tables
- ✓ D.Use columnar compression
- E.Run VACUUM command regularly
Why A: Option A is correct because defining appropriate sort keys on Redshift tables physically orders data on disk by the sort key columns, enabling zone maps to skip large blocks of data during range-filtered scans and dramatically reducing I/O for queries that filter or join on those columns. Option D is correct because columnar compression stores each column separately with encoding schemes (e.g., AZ64, ZSTD, LZO) that shrink data size, so Redshift reads fewer blocks from disk and from Amazon S3 during scans, improving query performance while lowering storage cost. Option B is not the intended answer because adding nodes increases cluster capacity and concurrency but does not by itself optimize the execution of individual queries. Option C is wrong because EVEN distribution is not optimal for all tables; ALL or KEY distribution is often better to avoid redistribution and broadcast steps during joins. Option E is not marked correct because VACUUM is a maintenance operation that reclaims space and re-sorts rows, but the question asks for actions that improve query performance, and the two designated correct answers are sort keys and columnar compression.
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.