nerdexam
Amazon

DEA-C01 · Question #99

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…

The correct answer is C. EXPLAIN ANALYZE SELECT * FROM sales. In Athena (which uses the Presto/Trino engine), EXPLAIN shows the logical and physical execution plan for a query but does not include runtime statistics. EXPLAIN ANALYZE actually executes the query and returns the execution plan annotated with real computational cost metrics…

Data Store Management

Question

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?

Options

  • AEXPLAIN SELECT * FROM sales;
  • BEXPLAIN ANALYZE FROM sales;
  • CEXPLAIN ANALYZE SELECT * FROM sales;
  • DEXPLAIN FROM sales;

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    76% (19)
  • D
    12% (3)

Explanation

In Athena (which uses the Presto/Trino engine), EXPLAIN shows the logical and physical execution plan for a query but does not include runtime statistics. EXPLAIN ANALYZE actually executes the query and returns the execution plan annotated with real computational cost metrics - rows processed, data read, CPU time, and wall time for each operator. The correct syntax requires a full SQL statement: EXPLAIN ANALYZE SELECT * FROM sales;. Option A (EXPLAIN SELECT * FROM sales) shows the plan but not the runtime costs. Options B and D have invalid syntax - EXPLAIN ANALYZE requires a full SELECT statement, and EXPLAIN alone with just FROM is not valid SQL.

Topics

#Athena Query Performance#SQL Execution Plan#EXPLAIN ANALYZE

Community Discussion

No community discussion yet for this question.

Full DEA-C01 Practice