Courseiva
Data Store ManagementhardMultiple ChoiceObjective-mapped

DEA-C01 Data Store Management Practice Question

A company uses Amazon Redshift for its data warehouse. The data engineer notices that the most frequently accessed table is sorted by date, but queries often filter by customer_id. The table has 500 million rows and uses AUTO distribution style. What change would MOST improve query performance?

⚠ Common exam trap

Many candidates assume distribution style (KEY or EVEN) is the primary lever for query performance on filtered columns, when in fact sort keys—especially compound sort keys—are far more impactful for reducing scanned data in range-filtered queries.

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

Change the sort key to include customer_id as a compound sort key.

Since queries frequently filter by customer_id but the table is sorted only by date, Redshift must scan all rows that match the date range and then filter by customer_id. By adding customer_id as a compound sort key (date, customer_id), Redshift can use zone maps to skip blocks that don't contain the requested customer_id within the date range, dramatically reducing the number of rows scanned and 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.

  • Change distribution style to KEY on customer_id.

    Why it's wrong here

    Distribution key helps with joins and data distribution, not filtering within a table.

  • Change distribution style to EVEN.

    Why it's wrong here

    EVEN distribution spreads data evenly but doesn't improve filter performance.

  • Change the sort key to include customer_id as a compound sort key.

    Why this is correct

    A compound sort key with customer_id first will optimize queries filtering by customer_id.

  • Change the sort key to an interleaved sort key on date and customer_id.

    Why it's wrong here

    Changing to an interleaved sort key is tempting as it addresses both `date` and `customer_id` filters. However, interleaved sort keys incur significant overhead for vacuuming and data loading, especially with 500 million rows. They are best suited for optimising queries that filter on multiple columns *independently* or in *various combinations*, where no single column is dominant. For a scenario where queries frequently filter by a specific column like `customer_id`, a compound sort key or a single sort key on `customer_id` would provide more direct performance benefits with less maintenance burden.

About these practice questions

One of 1,711 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 →

How Courseiva writes practice questions · Editorial policy

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. 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?

hard
  • A.Apply compression encoding to 'transaction_date'.
  • B.Set the sort key to 'transaction_date'.
  • C.Set the distribution key to 'transaction_date'.
  • D.Run VACUUM on the table.

Why B: 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.

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.