User Guide > Configuring the TDV Massively Parallel Processing Engine > When should the MPP Engine be engaged?
 
When should the MPP Engine be engaged?
MPP Engine is best suited when
1. The datasets retrieved by queries are of significant volume.
2. There are at least two or more datasets that need to be combined.
If the datasets are small, then using the MPP Engine will result in an overhead of setup time, unnecessary routing of data to different nodes and also to combine them back at runtime. In such a situation, using the classic engine gives best results.
However, the choice of not using the MPP Engine when not required can be controlled in the configuration of SQL Engine by the field called Minimum Partition Requirement.
Query examples to demonstrate the best use of the MPP Engine
Following is a sample query that can be handled by the MPP Engine:
 
SELECT nation, o_year, sum(1) sum_profit
FROM (SELECT n_name nation, EXTRACT(YEAR FROM o_orderdate) o_year, l_extendedprice - ps_supplycost * l_quantity amount
FROM /users/composite/drill/ds/tpchorcl234/C##TPCH10/H_part, /users/composite/drill/ds/tpchorcl236/C##TPCH10/H_supplier, /users/composite/drill/ds/tpchorcl234/C##TPCH10/H_lineitem, /users/composite/drill/ds/impala20_247/tpch/partsupp, /users/composite/drill/ds/tpchorcl234/C##TPCH10/H_order, /users/composite/drill/ds/impala20_247/tpch/nation
WHERE ((((((((s_suppkey = l_suppkey AND ps_suppkey = l_suppkey) AND ps_partkey = l_partkey) AND p_partkey = l_partkey) AND o_orderkey = l_orderkey) AND s_nationkey = n_nationkey) AND s_nationkey < 19) AND n_nationkey > 5) AND p_name LIKE '%dodger%')) profit
GROUP BY nation, o_year
ORDER BY nation ASC, o_year DESC
Follow these steps to run your query. The TDV MPP Engine is enabled by default, if the datasource is supported.
1. Create view with query, and fetch its execution plan. For instructions on running the Query Execution Plan, refer to Configuring the MPP engine from the Query Execution Plan Viewer
2. Check if it is passed to MPP Engine.
3. If a “No parallelization reason” is displayed, then according to the reason, decide if you need to adjust server configurations or if this query can only be supported by Classic engine.
4. If the query is passed to the MPP Engine, then execute the query. If MPP Engine supports the query in runtime, then the engine will return result, otherwise it will fall back to the Classic engine to execute.