‹ All DEA-C01 questions

DEA-C01 Practice Question 98: Redshift Nested Loop Join Alert

AWS Certified Data Engineer – Associate (DEA-C01) · Test 10 · question 8 of 10

Data Operations and Supportmedium

A data engineer investigates a slow Amazon Redshift query. In STL_ALERT_EVENT_LOG, the query has an alert titled "Nested Loop Join in the query plan". What is the recommended next step?

Select one answer
Show answer and explanation

Answer:

  • B. Review the join predicates to avoid a Cartesian product.

AWS's guide to reviewing query alerts maps each alert to a solution. For *"there is a nested loop join (the least optimal join) in the query plan"* the recommended solution is to *"review the join predicates to avoid Cartesian products."* A nested loop usually appears when a join condition is missing or too loose, so every row of one table is compared with every row of the other (option B).

- A is wrong because VACUUM is the recommended solution for the alert "scanned a large number of deleted rows", not for a nested loop join. - C is wrong because a distribution key change is recommended for alerts about redistributing or broadcasting many rows. It cannot fix a join that is logically a Cartesian product. - D is wrong because ANALYZE is the recommended solution for the alert "missing query planner statistics", not for a nested loop join.

Reference: Reviewing query alerts

Practice Test 10 ›

Study guides for DEA-C01