What problem does it solve? Slow Spark jobs, data skew, memory pressure, and excessive shuffles make data pipelines expensive and unreliable. This Skill provides production-tested patterns to diagnose and fix Spark performance bottlenecks. ## Core Features & Use Cases - Partitioning & Shuffle Optimization: Right-size partitions, use coalesce vs repartition correctly, and enable Adaptive Query Execution (AQE) for automatic skew handling. - Join & Caching Strategies: Apply broadcast joins, bucketed joins, salting for skewed keys, and proper storage levels for cached DataFrames. - Memory Tuning & Monitoring: Configure executor memory, detect partition skew programmatically, and inspect query plans with explain modes. - Use Case: A nightly ETL job processing terabytes of Parquet data takes 6 hours due to a skewed join. Use this Skill to apply salting and AQE skew join configuration, cutting runtime dramatically. ## Quick Start Ask the AI to optimize your slow PySpark job by analyzing its partitioning, joins, and memory configuration using the spark-optimization patterns.