One HQL statement how to query in hive
Interpreter, compiler, optimizer complete HQL query statement from lexical analysis, syntax analysis, compilation, optimization and query plan generation. The resulting query plan is stored in HDFS and executed in subsequent MapReduce calls.
![](http://dl2.iteye.com/upload/attachment/0127/4794/8274d206-0f6c-3664-a306-751ba6fee4d0.png)
How to view the execution plan of oracle
1. Execution plan without index creation
![](http://dl2.iteye.com/upload/attachment/0127/4796/eeed136d-3c72-325f-b2ed-37042f8e1437.png)
2. Execution plan for creating an index
![](http://dl2.iteye.com/upload/attachment/0127/4798/3f5f0392-eb45-34ba-8b1d-bb38eef132c5.png)
![](http://dl2.iteye.com/upload/attachment/0127/4800/c5cb01fe-f3bd-3db1-a167-a410dd7d7784.png)
Hive's execution plan is similar to oracle's execution plan