Experimental Functions
This document mainly introduces some experimental functions of Palo.
These experimental functions are turned off by default, and will be turned on by default in the later version upgrade after the function matures.
Join Reorder
In the field of data analysis, SQL query optimizer can significantly improve the execution efficiency of SQL submitted by users. One of the most important parts is to automatically adjust the Join order of tables in SQL. Different Join orders might lead to a huge difference in the efficiency of SQL execution.
The user can, in the new version, enable new Join Reorder algorithm logic through the following Session variable. The algorithm will try to avoid Cross Join and optimize the Join order according to the cost model.
set enable_cost_based_join_reorder = true;
In performing complex join operations, the user can try to enable this function to see if it can improve the execution efficiency.
Constant expression collapse
Palo query optimizer collapses some constant expressions in SQL (directly calculate the constant value and replace the constant expression in the original SQL), examples are as follows:
select * from tbl where k1 = 1+2;
==>
select * from tbl where k1 = 3;
Due to the limitation of calculation ability of Compute Node (FE), however, some complex constant expressions cannot be calculated, while the unfolded constant expressions may affect the optimization functions such as partition clipping and predicate push down.
In new version, the user can use the full expression calculation ability of Compute Node (BE) to calculate constant expressions by enable the following Session variable:
set enable_fold_constant_by_be = true;
Note that enabling this function will cause additional RPC overhead. In high concurrency query scenarios, the effect on the whole cluster should be observed.