AWS Certified Data Engineer – Associate (DEA-C01) — Question 90
A data engineer wants to improve the performance of SQL queries in Amazon Athena that run against a sales data table.
The data engineer wants to understand the execution plan of a specific SQL statement. The data engineer also wants to see the computational cost of each operation in a SQL query.
Which statement does the data engineer need to run to meet these requirements?
Answer options
- A. EXPLAIN SELECT * FROM sales;
- B. EXPLAIN ANALYZE FROM sales;
- C. EXPLAIN ANALYZE SELECT * FROM sales;
- D. EXPLAIN FROM sales;
Correct answer: C
Explanation
The correct answer is C, as the EXPLAIN ANALYZE SELECT * FROM sales; command provides both the execution plan and the computational cost for each operation in the query. Option A only shows the execution plan without the cost information, while option B lacks the SELECT statement, and option D also fails to provide cost details.