Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hive Explain plan without executing the Query.

avatar

Hi, I am new to hive. Is there any way to get the execution plan without executing the query? like oracle set Autotrace trace only option. Also can we see the result of set Hive.tez.exec.print.summary result without executing the query?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

You can get the explain plan by just adding the keyword EXPLAIN before the sql statement and executing it. Some SQL Tools will automatically trim part of the command so make sure you highlight EXPLAIN and the entire Query. That will just generate the plan and doesn't run the query. The TEZ Summary is a summary of actual work performed so there's no way to get it without running the query.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

You can get the explain plan by just adding the keyword EXPLAIN before the sql statement and executing it. Some SQL Tools will automatically trim part of the command so make sure you highlight EXPLAIN and the entire Query. That will just generate the plan and doesn't run the query. The TEZ Summary is a summary of actual work performed so there's no way to get it without running the query.

avatar

Thank You Shawn for the Response. I got it.