What would you suggest to speed up joins on large data sets?
Asked in the online SQL technical challenge stage. 6th question of the offline challenge; first five were typical SQL query questions.
You are given two AWS billing tables and need to compare join patterns. Write a SQL query that returns the join performance guidance for each join pattern in the sample data.
join_pattern, recommended_action, reasonjoin_pattern ascending| Column | Type | Description |
|---|---|---|
| pattern_idPK | INT | Primary key for the join pattern |
| join_pattern | VARCHAR(50) | Short name for the join pattern |
| estimated_rows_after_join | BIGINT | Estimated number of rows produced by the join |
| is_active | BOOLEAN | Whether the pattern is currently relevant |