Courseiva
Data Store Management →hardMultiple Choice

DEA-C01 Data Store Management Practice Question

A company uses Amazon Redshift for its data warehouse. The data engineer notices that queries are slow on a large table that is frequently filtered on a column 'transaction_date'. Which optimization technique best improves query performance?

⚠ Common exam trap

A common mix-up: candidates confuse distribution keys (which optimize joins) with sort keys (which optimize filtering and range scans), leading them to pick distribution key as the answer for a single-table filter performance issue.

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

✓

Set the sort key to 'transaction_date'.

Setting the sort key to 'transaction_date' organizes the table data physically by that column, which allows Redshift to use zone maps to skip blocks that don't match query filters. This dramatically reduces the amount of data scanned for range-restricted queries on 'transaction_date', improving query performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Apply compression encoding to 'transaction_date'.

    Why it's wrong here

    Sort keys, not compression, reduce scanned blocks when filtering transaction_date; encoding only shrinks storage and I/O per column. Compression is tempting because it lowers bytes read on every query, and it would be the right choice for a rarely filtered, wide column where storage cost dominates.

  • ✓

    Set the sort key to 'transaction_date'.

    Why this is correct

    Sort keys physically order rows on disk by transaction_date, so Redshift's zone maps skip irrelevant blocks when filtering that column, cutting scanned data. This targets the stem's frequently filtered column directly, unlike distribution keys, which address join and data-skew costs instead.

  • ✗

    Set the distribution key to 'transaction_date'.

    Why it's wrong here

    Distribution keys control how rows are spread across compute nodes; setting transaction_date as the key skews data by date and does not reduce scanning of filtered rows. It is tempting because distribution keys do affect join and query performance, but for a frequently filtered column the correct technique is a sort key, which enables zone-map block skipping.

  • ✗

    Run VACUUM on the table.

    Why it's wrong here

    VACUUM reclaims space from deleted rows and re-sorts unsorted data; it does not change how Redshift prunes blocks for a filter predicate, so slow filtered queries persist. It is tempting because VACUUM is a genuine maintenance task that improves some query performance, but the targeted fix here is defining transaction_date as a sort key.

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 →

How Courseiva writes practice questions · Editorial policy

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.