The same query reads 3 TB of gzip CSV or 160 MB of partitioned Parquet. The difference is how the data is laid out.
The analysts' dashboard asks for one day of purchases by country and takes 25 minutes. The events table is 2,000 gzip-compressed CSV files with 40 columns: 3 TB in total.
Spark has no choice but to read all of it. CSV has no column layout to skip, no statistics and no partition directories, so every byte is decompressed and parsed before the filter throws 99% of it away. And gzip isn't splittable, so each 1.5 GB file is read by one task from start to finish.
SELECT country, COUNT(*) AS purchases
FROM events -- 2,000 *.csv.gz files, 3 TB
WHERE dt = '2025-06-02' AND event_type = 'purchase'
GROUP BY country;Reach the last step for the run summary: the key takeaways from this lesson.