Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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.