Back to results for “Performance”
AWS › Amazon Athena

How does partitioning improve query performance and reduce cost in Athena?

Intermediate

Answer

Partitioning organizes your data into separate folders in S3 based on one or more key values, such as year, month, and day, so when a query filters on those partition keys, Athena can skip scanning irrelevant folders entirely, which both speeds up the query and reduces the amount of data scanned, directly lowering your cost.
SELECT * FROM logs WHERE year = '2026' AND month = '09';
Real-world example A logging platform partitions its S3 data by date, so a query asking for just one day of logs only scans that single day's folder instead of scanning years of accumulated log history.

Common follow-ups: What is the difference between Hive style partitioning and manual partitioning?;How do you add new partitions automatically as new data arrives?