Based on the DEA-C01 exam guideReport an error
Amazon Redshift is a petabyte-scale columnar MPP (Massively Parallel Processing) data warehouse. A cluster consists of one leader node and several compute nodes.
Client (SQL) ──► Leader node : parsing · query plan · result aggregation
│
┌───────────────┼───────────────┐
Compute node 1 Compute node 2 Compute node 3
[slice][slice] ... ← slice = smallest unit of parallel processing💡 Related Theory: The performance of an MPP system is set by its slowest slice, because the query is not finished until every slice is finished. If data piles up on one slice (skew), the query waits for that slice even while the other slices sit idle. The goal of distribution key design is "spread evenly, but keep rows that will be joined in the same place."
This determines how the rows of a table are placed across slices.
-- KEY distribution: rows with the same value in the specified column go to the same slice
CREATE TABLE orders (
order_id BIGINT,
customer_id BIGINT,
amount DECIMAL(12,2)
)
DISTSTYLE KEY
DISTKEY (customer_id);
-- ALL distribution: replicate the entire table to every node (for small dimension tables)
CREATE TABLE dim_region (region_id INT, region_name VARCHAR(50))
DISTSTYLE ALL;
-- EVEN distribution: spread evenly by round-robin (when the join key is unclear)
CREATE TABLE event_log (event_id BIGINT, payload VARCHAR(2000))
DISTSTYLE EVEN;| Style | Placement | When it fits | Price you pay |
|---|---|---|---|
| AUTO (default) | Starts as ALL while the table is small, then changes automatically to KEY (a suitable column such as the primary key) or EVEN as it grows | Most tables | You do not control it directly |
| KEY | Rows with the same value in one column go to the same slice | Large tables that are frequently joined on the same key | Skew if the values are lopsided |
| ALL | A full copy on every node | Small dimension tables that rarely change | Storage is multiplied by the node count, and loads and updates get slower |
| EVEN | Round-robin regardless of column values | The table does not take part in joins, or KEY and ALL are hard to choose between | Redistribution at join time |
What happens during a join is the criterion for choosing a distribution style.
EXPLAIN, DS_DIST_NONE and DS_DIST_ALL_NONE mean no redistribution, while DS_BCAST_INNER (the inner table is broadcast to all nodes) and DS_DIST_BOTH (both sides are redistributed) are signs of high cost.A table has one column as its DISTKEY. For a fact table that joins to several tables, choose the key of the largest and most frequently joined partner, and set the remaining small dimensions to ALL.
⚠️ Pitfall: Choosing a DISTKEY just because it is the join key causes skew. A column with only a few values (
status,country) or with rows piled onto one value (a column that is mostly NULL, or acustomer_idwhere one large customer accounts for half of the orders) makes a single slice heavy. Ifskew_rowsinSVV_TABLE_INFOis large, change the key or switch to EVEN.
-- Check distribution style, sort key, skew, and unsorted ratio for each table
SELECT "table", diststyle, sortkey1, skew_rows, unsorted, stats_off
FROM svv_table_info
ORDER BY skew_rows DESC;A sort key stores rows on disk in sorted order. Redshift holds column data in 1 MB blocks and keeps the minimum and maximum values of each block as metadata (the zone map). When a range condition is applied, blocks whose min–max range does not overlap the condition are skipped entirely.
CREATE TABLE sales (
sale_date DATE,
region VARCHAR(20),
amount DECIMAL(12,2)
)
DISTKEY (region)
COMPOUND SORTKEY (sale_date, region);| Aspect | COMPOUND (default) | INTERLEAVED |
|---|---|---|
| Sorting | In the declared column order | Equal weight on each column |
| Conditions it helps | Filters that use the leading columns (prefix) | Any combination of the key columns |
| Conditions it does not help | Filtering on the second column alone, without the first | Tables dominated by monotonically increasing columns (dates, serial numbers) |
| Number of columns | Several | Up to 8 |
| Maintenance | VACUUM | VACUUM REINDEX (takes much longer because of an extra analysis step) |
| Recommended for | Tables with steady INSERT, UPDATE, and DELETE activity | Large tables with varied filter axes and few changes |
SORTKEY AUTO, Redshift looks at the query patterns and chooses the sort key. This is the default recommendation in the official documentation.WHERE TRUNC(sale_ts) = ...) defeats block skipping. Compare the column as it is.| Aspect | RA3 provisioned | Redshift Serverless | DC2 (previous generation) |
|---|---|---|---|
| Compute and storage | Separated. Data lives in Redshift Managed Storage, and the local SSD is a cache | Separated | Coupled (the node's local SSD) |
| Capacity adjustment | You choose the node type and count directly | Scales automatically in RPUs | Add nodes (storage grows with them) |
| Billing | Node hours + managed storage (GB-month, independent of node count) | RPU-hours (per second, 60-second minimum) + storage | Node hours |
| When it fits | Steady workloads, fine-grained control | Intermittent or unpredictable workloads, minimal operations | Existing clusters. In question stems, it appears as the starting point for moving to RA3 |
You query files on S3 directly as external tables without loading the data into Redshift.
-- Spectrum external schema + join S3 data with an internal table
CREATE EXTERNAL SCHEMA spectrum_ext
FROM DATA CATALOG DATABASE 'datalake_db'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftSpectrumRole';
SELECT d.region, SUM(s.amount)
FROM spectrum_ext.raw_events s -- External table on S3
JOIN dim_region d ON s.region_id = d.region_id -- Internal Redshift table
WHERE s.dt = '2026-06-26' -- Partition column of the external table → pruning
GROUP BY d.region;| Decision | Load into Redshift | Query with Spectrum | Athena |
|---|---|---|---|
| Access frequency | Frequent, repeated | Occasional, historical | Intermittent ad hoc |
| Performance | Fastest (distribution and sort keys) | Depends on file format and partitions | Depends on file format and partitions |
| Billing | Cluster/RPU | Data scanned + cluster | Data scanned only |
| Prerequisite | A loading pipeline | Redshift already exists | No infrastructure |
| Typical clue | "A repeating dashboard of complex joins" | "Join warehouse data with S3 history" | "Query S3 with SQL without a cluster" |
Workload management (WLM) puts queries into queues and divides resources among the queues.
| Aspect | Auto WLM (recommended, default) | Manual WLM |
|---|---|---|
| Concurrency and memory | Redshift adjusts dynamically by looking at what each query requires | You fix the slot count and memory percentage for each queue |
| Queues | Up to 8, each with a priority | Up to 8 user queues, with a total of at most 50 slots |
| When a heavy query arrives | Lowers the number of concurrent queries and concentrates memory | Uses only the memory fixed to the slot (spills to disk if short) |
| Tuning levers | Priority, query monitoring rules | Slot count, memory %, query monitoring rules |
SET query_group TO 'critical_dashboards';).Concurrency scaling automatically attaches temporary clusters when queries pile up in a queue, and runs the waiting queries there.
auto. The number of clusters that can be attached is set by max_concurrency_scaling_clusters (default 1).Concurrency scaling is a model of "leave the storage and the main cluster as they are, and borrow only processing capacity for a short time." It fits short, periodic bursts such as a dashboard refresh every morning. If the queue is full all day long, that is not a burst but a capacity shortage, so you resize the cluster or fix the query and key design.
COPY sales
FROM 's3://acme-datalake-curated/sales/2026/06/'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftCopyRole'
FORMAT AS PARQUET;COMPUPDATE selects the compression encoding of each column automatically.UNLOAD. It exports query results to S3 in parallel (Parquet and partitioning can be specified).| Task | What it does | Automation |
|---|---|---|
VACUUM | Reclaims space from rows marked as deleted and re-sorts the unsorted region | Automatic delete reclamation and automatic sorting in the background |
ANALYZE | Refreshes statistics for the optimizer | Automatic ANALYZE |
| Materialized view | Pre-stores the results of repeated joins and aggregations | Automatic refresh, with incremental refresh when conditions allow |
| Result caching | Reuses the results of an identical query | Default behavior |
stats_off), the optimizer picks the wrong join order and distribution method. Check the statistics after a bulk load.| Symptom | Cause | Action |
|---|---|---|
A large-table join is slow and DS_DIST_BOTH/DS_BCAST_INNER appears | Join key and distribution key do not match | Give both sides the same DISTKEY, and make the small side ALL |
| Only one node has high disk or CPU | DISTKEY skew | Change to an evenly distributed key, or use EVEN |
| A date range query reads every block | No sort key, large unsorted region, or a function applied to the column | Make the date the first sort key column, VACUUM, fix the condition expression |
| Queries wait in the queue every morning | Burst of concurrent queries | Concurrency scaling, SQA |
| One query monopolizes the cluster | Runaway query | Abort it with QMR or lower its priority |
| After adding slots, queries spill to disk and slow down | Memory per slot decreased in manual WLM | Auto WLM |
| COPY is slow | One large gzip file | Split into multiple files (a multiple of the slice count) |
| Still slow after a large delete and the space is unchanged | Rows marked as deleted remain | VACUUM |
| You keep adding nodes just for storage | The coupled structure of DC2 | RA3, or move older data to S3 + Spectrum |
| Clue in the question | Answer |
|---|---|
| "Two large tables are frequently joined on the same column; eliminate redistribution" | Make that column the DISTKEY on both sides |
| "Join between a small dimension table and a large fact table" | DISTSTYLE ALL on the dimension table |
| "Most queries are date range lookups" | Date as the first column of a COMPOUND SORTKEY |
| "The filter varies across many columns" | INTERLEAVED SORTKEY |
| "Grow storage but keep compute the same" | RA3 (managed storage) |
| "Join historical data on S3 with warehouse tables without loading" | Redshift Spectrum |
| "Concurrent queries pile up and wait only at certain hours" | Concurrency scaling |
| "Short queries wait behind long ones" | SQA |
| "Automatically abort queries that run longer than a set time" | Query monitoring rules |
| "Usage is intermittent, and the team does not want to manage a cluster" | Redshift Serverless |
| "Load a large number of files from S3 as fast as possible" | COPY from multiple split files |
| "Shorten the response time of repeated heavy aggregations" | Materialized view |
Tomorrow we cover Athena, which queries S3 with SQL without a cluster, and its cost structure.
Click a choice to reveal the answer and explanation.
Question 1
When two large tables are frequently joined on customer_id, which setting is the most appropriate for performing the join without network redistribution (a co-located join)?
Question 2
Which distribution style is the most appropriate for eliminating redistribution when joining a small dimension table with a large fact table?
Question 3
Which Redshift feature queries external tables stored in S3 directly, without loading the data into the cluster, and is billed based on the amount of data scanned?
Question 4
Which option most accurately describes how sort keys and zone maps improve query performance?
Question 5
Every early morning, dashboard refreshes cause read queries to spike temporarily and queue wait times grow long. Which feature is the most appropriate for reducing the wait while minimizing additional cost?