QuestionQ102

VerifiedData Operations and Support

A company operates a data-processing pipeline that runs multiple SQL queries sequentially against an Amazon Redshift cluster. The company merges with another company. The original company changes a query that aggregates sales-revenue data so that it joins sales tables from both companies. The first company’s sales table is named Table S1. The second company’s sales table is named Table S2. Table S1 has 10 billion records. Table S2 has 900 million records.

The query becomes slow after the change. A data engineer must improve query performance.

Which solutions meet these requirements?

Choose two
Explanation

KEY distribution on the common, high-cardinality join column places matching rows from both sales tables on the same node slices, minimizing data redistribution and avoiding skew during the join. Amazon Redshift Advisor analyzes cluster workload and supplies recommendations, including ALTER TABLE statements for beneficial distribution styles and distribution keys. ALL distribution replicates an entire table to every node and increases storage, load, and maintenance costs, so it is not appropriate for a 900-million-record sales table.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!