A data engineering team uses Amazon Redshift for analytics. They notice that queries on a large fact table are slow. The table is distributed using DISTSTYLE ALL. Which design change would most likely improve query performance?
Trap 1: Change DISTSTYLE to EVEN to distribute rows evenly across slices.
DISTSTYLE ALL already replicates the entire table to every node slice, so EVEN would not reduce per-slice data volume for this fact table. EVEN suits large dimension or staging tables joined less frequently, where even slice distribution matters.
Trap 2: Increase the number of nodes in the Redshift cluster.
Adding nodes does not fix the underlying cause: DISTSTYLE ALL copies the full table to every slice, so more nodes means more redundant copies and longer loads, not faster scans. Scaling suits clusters genuinely short of compute or storage capacity.
Trap 3: Change the table to use a SORTKEY on the most frequently filtered…
A SORTKEY reduces the blocks scanned only when queries filter on that column, but the stem never states which columns queries filter on. SORTKEY selection requires identifying the most frequently filtered column first, so this is speculative rather than the likely fix.
- A
Change DISTSTYLE to EVEN to distribute rows evenly across slices.
Why it fails: DISTSTYLE ALL already replicates the entire table to every node slice, so EVEN would not reduce per-slice data volume for this fact table. EVEN suits large dimension or staging tables joined less frequently, where even slice distribution matters.
- B
Increase the number of nodes in the Redshift cluster.
Why it fails: Adding nodes does not fix the underlying cause: DISTSTYLE ALL copies the full table to every slice, so more nodes means more redundant copies and longer loads, not faster scans. Scaling suits clusters genuinely short of compute or storage capacity.
- C
Change the table to use a SORTKEY on the most frequently filtered column.
Why it fails: A SORTKEY reduces the blocks scanned only when queries filter on that column, but the stem never states which columns queries filter on. SORTKEY selection requires identifying the most frequently filtered column first, so this is speculative rather than the likely fix.
- D
Change DISTSTYLE to KEY on a column used in frequent joins.
DISTSTYLE ALL replicates the entire table to every node, inflating storage and slowing scans and loads on a large fact table. Distributing on a frequently joined key colocates matching rows, letting joins execute locally and cutting network redistribution during queries.