Optimizing Amazon Athena Query Performance with Parquet and Partitioning
Short answer
D Convert CSV logs to a single Apache Parquet file per day, partition by date, and use predicate pushdown filters for shortest query times.
Question
Query times are increasing because of increasing transaction volume. The company wants to improve query performance.
Which solution will meet these requirements with the SHORTEST query times?
Key Takeaways
The main trap is choosing row-based formats (JSON, Avro) or less optimal columnar setups; the key is using Parquet with predicate pushdown to scan only required columns.
Learn how to minimize Amazon Athena query times by converting CSV logs to Apache Parquet, partitioning by date, and leveraging predicate pushdown filters for efficient column scanning.
Common mistake: Choosing Option A (ORC) or Option B (JSON) because users may confuse general database optimization with Athena's specific strengths in columnar storage and partitioning.
Expert Analysis
The core concept tested here is data format optimization for Amazon Athena, specifically the trade-offs between columnar formats and how they interact with query engines. The question asks for the solution with the SHORTEST query times given increasing transaction volumes.
Athena performs best with columnar data formats like Apache Parquet or ORC. These formats allow Athena to use predicate pushdown (also known as column pruning), meaning it only reads the columns needed for the query and skips irrelevant data, significantly reducing I/O and processing time. Among columnar formats, Parquet is widely regarded in AWS contexts as having superior compression ratios and performance characteristics for analytical workloads compared to ORC, especially when dealing with large-scale log data.
Let's evaluate the options:
- Option A suggests using multiple ORC files. While ORC is a valid columnar format, splitting data into multiple small files can introduce overhead due to metadata management and file open/close operations. Furthermore, Parquet is generally preferred over ORC in modern AWS analytics stacks unless there is a specific Hadoop ecosystem constraint.
- Option B suggests JSON. JSON is a row-based format. Reading JSON requires parsing the entire record even if only a subset of attributes is needed. This leads to higher I/O and slower query times compared to columnar formats. It does not support efficient predicate pushdown in the same way.
- Option C suggests Avro. Avro is a row-based format optimized for write-heavy transactions and serialization, not for read-heavy analytical queries. It does not support column pruning effectively, making it unsuitable for improving query performance in Athena.
- Option D suggests converting to a single Apache Parquet file per day, partitioned by date, and using predicate pushdown. This approach combines the benefits of a highly efficient columnar format (Parquet) with effective partitioning. Using a single file per day avoids the overhead of managing many small files while still allowing parallelism across days via partitioning. Predicate pushdown ensures only necessary columns are scanned. This combination typically yields the lowest latency for subset attribute queries on large datasets.
Community comments correctly identify Parquet as the preferred format and highlight the importance of predicate pushdown. One comment notes that missing file size considerations might favor a single larger Parquet file over multiple small ORC files, reinforcing Option D as the optimal choice for minimizing query time.
Official Reference
https://docs.aws.amazon.com/athena/latest/ug/data-formats.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When optimizing Athena queries, always prioritize columnar formats (Parquet/ORC) over row-based ones (CSV/JSON/Avro). Look for answers that combine a columnar format with partitioning and mention 'predicate pushdown' or 'column pruning'. Avoid options suggesting multiple small files unless explicitly justified by parallelism needs that outweigh metadata overhead.
Frequently Asked Questions
Why is Parquet better than CSV for Athena queries?
What is predicate pushdown in Athena?
Community Votes
50% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
9f871d2 👍 1 Answered DFor Athena query performance on log/CSV data: Convert to Parquet (preferred over ORC in most AWS scenarios) Partition by date (or other high-cardinality filter columns) Use predicate pushdown in queries
-
Manishkum 👍 1 Answered AConvert the CSV logs into multiple ORC files for better parallelism in Athena. Partition by date in Amazon S3. also Use columnar pushdown filters.
-
AWS82siast 👍 1 Answered Dmissing file size, one parquet is still better than multiple small ORC files upto certain size.
-
pavelkuropatin 👍 1 Answered Anot D - single file per day is not okay
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DEA-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DEA-C01 Practice Test →