A query plan (or query execution plan) is a set of actions that a SQL relational database management system uses to obtain data. The relational model concept of access plans is used in this scenario. The EXPLAIN command in Impala can be used to see this. It will demonstrate Impala’s low-level algorithms for reading data, dividing work among cluster nodes, and transmitting intermediate and final results over the network.
EXPLAIN SELECT COUNT(*) FROM tbEmployeeDetails;
Read the EXPLAIN plan from bottom to top:
- The final section of the plan displays low-level details such as the projected quantity of data that will be read, allowing you to evaluate the success of your partitioning strategy and predict how long it will take to scan a table based on total data size and cluster size.
- You’ll see the operations that will be parallelized and done on each Impala node as you progress.
- You can see how data flows at higher levels as intermediate result sets are combined and transmitted from one node to another.
Hope you find this article helpful.