Detection

An Athena log table is partitioned by a separate date key, but an investigation query filters only the event timestamp and scans months of data. How should an analyst reduce scanned data while preserving every matching event?

Show the answer

Correct answerA. Add a partition-key predicate covering the relevant dates

AWhy this is right: Filtering the partition key excludes irrelevant partitions while the timestamp filter preserves exact matching.

BWhy not this: Selecting fewer columns does not resolve the missing partition pruning and may not reduce scans of row-oriented logs.

CWhy not this: A result limit can omit matching events and does not reliably prevent scanning unrelated partitions.

DWhy not this: Sorting changes result order but does not eliminate unrelated date partitions from the scan.

A predicate on the date partition key lets Athena prune irrelevant partitions; retain the timestamp filter for exact event selection. A result limit restricts returned rows, not reliably the data scanned, and could omit matching events.