See all drill best practice FAQs.
In Drill, a query is broken into logical boundaries called Major Fragments. These are constituted of multiple Minor Fragments. Minor Fragment is where the execution of a particular slice of data is happening for that Major Fragment. Minor Fragments constitute of one or more operators which are executed sequentially over a slice of data.
To know about how parallel the query execution happened, one needs to look for the number of minor fragments in a major fragment.
To illustrate with an example, let us consider the following is the information provided in the query profile.
Minor Fragments Reporting
1 / 1
42 / 42
4 / 4
In the above table, fragment 00(the one which is displayed is the major fragment id; i.e 00 in 00-xx-xx) constitutes of only one minor fragment. But for fragments 01 and 02, the work is broken down into 42 and 4 minor fragments respectively.
To know how parallel an operator in a physical plan executed, find out in which major fragment the operator is located in the plan.
Let us say there is a hash join in the plan and one wants to know how parallel the hash join has been executed.
01-xx-03 - HASH_JOIN
From the numbering of the hash join (01-xx-03), it can be observed that hash join is located in 01 Major Fragment. Hence it can be concluded that Hash join went 42 way parallel.
One caveat here is that some major fragments themselves can execute in parallel, so the maximum parallelism for the query is very hard to compute. It can be anything between lowest parallelism of a major fragment to sum of parallelism of the major fragments depending upon which major fragments are executed in parallel.
Retrieving data ...