How Does Athena Show a Query Execution Plan With Computational Cost?
Short answer
C EXPLAIN ANALYZE SELECT * FROM sales; returns the Athena execution plan plus the computational cost of each operator.
Question
Key Takeaways
The question tests the difference between EXPLAIN (plan only) and EXPLAIN ANALYZE (plan plus per-operator runtime cost and rows processed), and the trap is choosing the plan-only form or breaking the syntax by dropping SELECT.
Amazon Athena's EXPLAIN ANALYZE statement returns both the distributed execution plan and the actual computational cost of every operator in a query. This page confirms that EXPLAIN ANALYZE SELECT * FROM sales; is the statement that satisfies both requirements, while plain EXPLAIN only shows the plan.
Common mistake: Candidates pick A, plain EXPLAIN SELECT * FROM sales, because it does produce an execution plan — but it never runs the query, so no computational cost per operation is reported.
Expert Analysis
Why the Answer Is Correct
Amazon Athena supports EXPLAIN and EXPLAIN ANALYZE as prefixes to a SELECT statement. Plain EXPLAIN compiles the query and returns the logical/distributed plan without executing it, so it gives no runtime cost. EXPLAIN ANALYZE actually runs the query, then returns the execution plan annotated with metrics such as rows processed, bytes read and the CPU/wall time attributed to each operator — exactly the "computational cost of each operation" the engineer needs. The full statement therefore has to be EXPLAIN ANALYZE SELECT * FROM sales;, which keeps the SELECT keyword that Athena's parser requires.
Why the Other Options Are Wrong
Option A (EXPLAIN SELECT * FROM sales;) is syntactically valid and does return an execution plan, but because the query is not executed it cannot report computational cost, so it satisfies only half the requirement. Option B (EXPLAIN ANALYZE FROM sales;) drops the SELECT and is not valid Athena syntax, so it fails outright. Option D (EXPLAIN FROM sales;) has the same missing-SELECT syntax defect and, even if it parsed, would not include ANALYZE metrics. As tgv summarised in the thread, only C "fully meets the requirements by providing both the execution plan and the computational costs."
Community Comment Notes
Consensus in the comments is unanimous for option C, and FunkyFresco pointed learners directly at the Athena documentation page for the EXPLAIN statement. HunkyBunky restated the working form as "explain analyze + select * from table", reinforcing that the SELECT keyword must remain in place. The shared lesson is that the two keywords ANALYZE and SELECT are both mandatory for cost-level detail in Athena.
Official Reference
https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
Memorise the pairing: EXPLAIN gives you the plan only, EXPLAIN ANALYZE gives you the plan plus real execution metrics and cost. When a question mentions cost, rows processed or per-operator statistics, the answer will contain ANALYZE and a complete SELECT statement.
Frequently Asked Questions
Why is plain EXPLAIN SELECT * FROM sales; not enough in Athena?
Why does EXPLAIN ANALYZE FROM sales; fail in Athena?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 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 3
-
FunkyFresco 👍 5 Answered Cuse EXPLAIN ANALIZE https://docs.aws.amazon.com/athena/latest/ug/athena-explain-statement.html
-
tgv 👍 4 Answered CA - Only partially meets the requirements as it does not include computational costs. B - Incorrect syntax and does not meet the requirements. C - Fully meets the requirements by providing both the execution plan and the computational costs. D - Incorrect syntax and does not meet the requirements.
-
HunkyBunky 👍 1 Answered Cexplain analyze + select * from table
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 →