Scenario1
- Pyspark sql dataframe df1 consisting of shape (7823061,26) has been made by doing lot of transformation in pyspark.
- Further transformation on this pyspark dataframe like group by and join takes a lot of time, like in hours.
Scenario2
- Save this dataframe on the disk using coaelesce and reading the dataframe again.
- Improves the performance of further transformations considerably.(like in seconds from hours)
Question Why does this improvement in performance happens?