MLA-C01 Data Preparation for Machine Learning Practice Question
A data engineer is optimizing Amazon Athena queries on large datasets stored in S3 for machine learning data preparation. Which THREE practices improve query performance?
⚠ Common exam trap
AWS often tests the misconception that more partitions always improve performance, but in reality, over-partitioning leads to metastore overhead and small file problems that degrade query performance.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Partition the data by a frequently filtered column, such as date
Option A is correct because partitioning the S3 data by a frequently filtered column such as date lets Athena prune partitions and scan only the relevant prefixes, drastically reducing the amount of data read and thus improving performance and lowering cost. Option D is correct because columnar formats like Parquet or ORC allow Athena to read only the columns referenced by a query and provide better compression and predicate pushdown, minimizing I/O compared to row-based formats. Option E is correct because compressing data with Snappy or gzip reduces the bytes transferred from S3 and read by Athena, and these splittable/columnar-friendly codecs work well with Parquet/ORC to further speed up scans. Option B is incorrect because uncompressed CSV is a row-based, non-splittable-friendly format that forces Athena to scan all columns and more bytes, hurting performance. Option C is incorrect because partitioning by every column creates an excessive number of small partitions and files, which increases metadata overhead and can degrade rather than improve query performance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Partition the data by a frequently filtered column, such as date
Why this is correct
Partitioning by a frequently filtered column such as date lets Athena prune irrelevant partitions, scanning only the data each query needs. This directly reduces bytes read from S3, which is the dominant cost and latency factor for large datasets.
- ✗
Use uncompressed CSV files for simplicity
Why it's wrong here
Uncompressed CSV forces Athena to scan and parse far more bytes, increasing cost and latency. It tempts because CSV is human-readable and simple to generate, but columnar, compressed formats such as Parquet or ORC with Snappy enable partition and column pruning that Athena exploits.
- ✗
Partition the data by every column to maximize filtering
Why it's wrong here
Partitioning on every column creates excessive small partitions and metadata overhead, degrading Athena performance rather than improving it. It tempts because partitioning does prune scanned data, but effective partitioning targets low-cardinality columns used in filters, not every column in the dataset.
- ✓
Store data in columnar formats like Parquet or ORC
Why this is correct
Columnar formats like Parquet or ORC let Athena read only the columns each query references, rather than entire rows. Combined with compression, this sharply reduces bytes scanned from S3, improving performance on large machine learning datasets.
- ✓
Compress the data with Snappy or gzip
Why this is correct
Compression reduces the bytes Athena scans from S3, directly cutting query runtime and cost. Snappy and gzip are splittable or columnar-friendly formats that let Athena read fewer blocks, satisfying the stem's goal of faster queries over large ML datasets.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 665-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.