Reviewed by Aditya Kumar Β· Last reviewed 2026-03-24
**Identify**: Skewed keys (e.g., NULL, bot user_id). **Solutions**: (1) **Salting**: Add random suffix 0..N to key in both tables; join; aggregate. (2) **Broadcast**: If one side small. (3) **Skew join**: Process skewed keys separately. (4) **AQE**: Spark 3.x auto-optimizes....
Identify: Skewed keys (e.g., NULL, bot user_id). Solutions: (1) Salting: Add random suffix 0..N to key in both tables; join; aggregate. (2) Broadcast: If one side small. (3) Skew join: Process skewed keys separately. (4) AQE: Spark 3.x auto-optimizes. Trade-off: Salting adds shuffle; AQE is automatic. Monitor: Task duration in Spark UI.
Red Flag: Ignoring 80/20 key distribution. Pro-Move: 'We salted the top 10 keys (2% of data, 40% of rows)βrest standard join; eliminated stragglers, 4Γ faster.'
According to DataEngPrep.tech, this is one of the most frequently asked SQL interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.