Back to results for “Amazon Athena”
AWS › Amazon Athena

How does Athena pricing work, and how can you reduce query costs?

Beginner

Answer

Athena charges based on the amount of data scanned by each query, so you can reduce costs significantly by converting your data into a compressed columnar format like Parquet, partitioning your data by fields commonly used in filters such as date, and only selecting the specific columns you need instead of using select star.
CREATE TABLE sales_parquet WITH (format = 'PARQUET') AS SELECT * FROM sales_data;
Real-world example A company reduces its monthly Athena bill by over seventy percent after converting its raw CSV log files into partitioned Parquet format, since each query then scans far less data.

Common follow-ups: What is the difference between row based and columnar storage formats?;How do you set up data partitioning in Athena?