网站做导航的地图导航,网络营销推广外包服务,WordPress文字添加,品牌建设涉及到相关 《Postgresql源码#xff08;85#xff09;查询执行——表达式解析器分析#xff08;select 11如何执行#xff09;》 《Postgresql源码#xff08;113#xff09;表达式JIT计算简单分析》 1 普通表达式计算
普通表达式计算发生在优化器preprocess_expression中85查询执行——表达式解析器分析select 11如何执行》 《Postgresql源码113表达式JIT计算简单分析》 1 普通表达式计算
普通表达式计算发生在优化器preprocess_expression中会先把能算出来的函数都计算一遍把值添加到plan中。
#0 ExecInterpExpr (state0x16188b8, econtext0x1618df8, isnull0x7ffcbbb1b6af) at execExprInterp.c:508
#1 0x000000000072b06f in ExecInterpExprStillValid (state0x16188b8, econtext0x1618df8, isNull0x7ffcbbb1b6af) at execExprInterp.c:1870
#2 0x00000000008abc53 in ExecEvalExprSwitchContext (state0x16188b8, econtext0x1618df8, isNull0x7ffcbbb1b6af) at ../../../../src/include/executor/executor.h:355
#3 0x00000000008b33d5 in evaluate_expr (expr0x15524d8, result_type23, result_typmod-1, result_collation0) at clauses.c:4902
#4 0x00000000008b26f8 in evaluate_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args0x1552438, funcvariadicfalse,func_tuple0x7f8ed3ebc3f8, context0x7ffcbbb1ccb0) at clauses.c:4409
#5 0x00000000008b1a47 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffcbbb1b8c8, funcvariadicfalse,process_argstrue, allow_non_consttrue, context0x7ffcbbb1ccb0) at clauses.c:3997
#6 0x00000000008af028 in eval_const_expressions_mutator (node0x1521488, context0x7ffcbbb1ccb0) at clauses.c:2551
#7 0x00000000007e7ed9 in expression_tree_mutator_impl (node0x15214d8, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffcbbb1ccb0) at nodeFuncs.c:3298
#8 0x00000000008b13ec in eval_const_expressions_mutator (node0x15214d8, context0x7ffcbbb1ccb0) at clauses.c:3616
#9 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1521528, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffcbbb1ccb0) at nodeFuncs.c:3384
#10 0x00000000008b13ec in eval_const_expressions_mutator (node0x1521528, context0x7ffcbbb1ccb0) at clauses.c:3616
#11 0x00000000008ae720 in eval_const_expressions (root0x1521648, node0x1521528) at clauses.c:2183
#12 0x0000000000885d2a in preprocess_expression (root0x1521648, expr0x1521528, kind1) at planner.c:1144
#13 0x0000000000885173 in subquery_planner (glob0x1520e08, parse0x1520f18, parent_root0x0, hasRecursionfalse, tuple_fraction0) at planner.c:811
#14 0x0000000000884293 in standard_planner (parse0x1520f18, query_string0x151fe78 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:413
#15 0x000000000088403a in planner (parse0x1520f18, query_string0x151fe78 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:281
#16 0x00000000009b5ec0 in pg_plan_query (querytree0x1520f18, query_string0x151fe78 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:904
#17 0x00000000009b600c in pg_plan_queries (querytrees0x15215f8, query_string0x151fe78 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:996
#18 0x00000000009b638c in exec_simple_query (query_string0x151fe78 select 1000abs(-10000)100;) at postgres.c:1193
#19 0x00000000009bab95 in PostgresMain (dbname0x15572f8 postgres, username0x151bad8 mingjie) at postgres.c:4637
#20 0x00000000008f1d6d in BackendRun (port0x154db80) at postmaster.c:4464
#21 0x00000000008f1706 in BackendStartup (port0x154db80) at postmaster.c:4192
#22 0x00000000008edfd1 in ServerLoop () at postmaster.c:1782
#23 0x00000000008ed9a1 in PostmasterMain (argc1, argv0x1519a80) at postmaster.c:1466
#24 0x00000000007b8201 in main (argc1, argv0x1519a80) at main.c:1981.1 计算select 1000abs(-10000)100;
select 1000abs(-10000)100;Query Tree 优化器处理ExecInterpExpr过程
1.1.1 第一步计算abs(-10000)
ExecInterpExpr(gdb) p *state
$6 {type T_ExprState, flags 6 \006, resnull false, resvalue 0, resultslot 0x0, steps 0x16189e8,evalfunc 0x7288a3 ExecInterpExpr, expr 0x15522f8, → 指向上面FuncExprevalfunc_private 0x7288a3 ExecInterpExpr, steps_len 2, steps_alloc 16, parent 0x0, ext_params 0x0, innermost_caseval 0x0, innermost_casenull 0x0,innermost_domainval 0x0, innermost_domainnull 0x0}先看第0步跳转到哪 第一步EEOP_FUNCEXPR_STRICT 第二步EEOP_DONE
(gdb) p/x state-steps[0]-opcode
$23 0x72914f
(gdb) p/x state-steps[1]-opcode
$30 0x72893a(gdb) p reverse_dispatch_table
$24 {
...
{opcode 0x72893a ExecInterpExpr151, op EEOP_DONE},
{opcode 0x72914f ExecInterpExpr2220, op EEOP_FUNCEXPR_STRICT}
...
}当前分支所需数据
(gdb) p state-steps[0]-d.func
$14 {finfo 0x1618948, fcinfo_data 0x1618998, fn_addr 0xa51c5d int4abs, nargs 1}进入分支干活计算abs(-10000)结果 EEO_CASE(EEOP_FUNCEXPR_STRICT){FunctionCallInfo fcinfo op-d.func.fcinfo_data;NullableDatum *args fcinfo-args;int nargs op-d.func.nargs;Datum d;/* strict function, so check for NULL args */for (int argno 0; argno nargs; argno){if (args[argno].isnull){*op-resnull true;goto strictfail;}}fcinfo-isnull false;d op-d.func.fn_addr(fcinfo); // 用函数地址调用函数拿到结果*op-resvalue d;*op-resnull fcinfo-isnull;strictfail:EEO_NEXT();}下面内存可参考《Postgresql源码85查询执行——表达式解析器分析select 11如何执行》 在回忆一下表达式计算ExecInterpExpr函数的过程核心就是这个op也就是step这个ExprEvalStep结构体在执行ExecInterpExpr时作为核心结构体中的数据传入具体在ExprState→steps中保存这是一个数据每一个元素代表一次计算由ExprEvalStep结构记录当前计算的内存 1.1.2 第二步计算100010000
同上注意上面第一步和现在的steps_len都是2也就是都做一次计算。
就是说每次计算都是由eval_const_expressions_mutator遍历树时发现function节点后发生的。
(gdb) p *state
$31 {type T_ExprState, flags 6 \006, resnull false, resvalue 0, resultslot 0x0, steps 0x16189e8, evalfunc 0x7288a3 ExecInterpExpr, expr 0x1552398, // FuncExpr-args {Const{1000}, Const{10000}}evalfunc_private 0x7288a3 ExecInterpExpr, steps_len 2, steps_alloc 16, parent 0x0, ext_params 0x0, innermost_caseval 0x0, innermost_casenull 0x0,innermost_domainval 0x0, innermost_domainnull 0x0}1.1.3 第三步计算11000100
同上
2 JIT表达式计算
2.1 计算select 1000abs(-10000)100;
第一次进入jit堆栈jit_compile_exprstate→expr (FuncExpr)表示abs(-10000)
因为不是parent表达式不再继续计算
#0 jit_compile_expr (state0x1deae18) at jit.c:180
#1 0x000000000071fa6b in ExecReadyExpr (state0x1deae18) at execExpr.c:874
#2 0x000000000071e60b in ExecInitExpr (node0x1dfabb8, parent0x0) at execExpr.c:152
#3 0x00000000008b3395 in evaluate_expr (expr0x1dfabb8, result_type23, result_typmod-1, result_collation0) at clauses.c:4892
#4 0x00000000008b26f8 in evaluate_function (funcid1397, result_type23, result_typmod-1, result_collid0, input_collid0, args0x1dfab68, funcvariadicfalse, func_tuple0x7fd9588871a8, context0x7ffdd8867f20) at clauses.c:4409
#5 0x00000000008b1a47 in simplify_function (funcid1397, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8865960, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3997
#6 0x00000000008aee93 in eval_const_expressions_mutator (node0x1cf92e8, context0x7ffdd8867f20) at clauses.c:2503
#7 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9338, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#8 0x00000000008b1a05 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8866248, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3988
#9 0x00000000008af028 in eval_const_expressions_mutator (node0x1cf9388, context0x7ffdd8867f20) at clauses.c:2551
#10 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9428, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#11 0x00000000008b1a05 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8866b38, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3988
#12 0x00000000008af028 in eval_const_expressions_mutator (node0x1cf9478, context0x7ffdd8867f20) at clauses.c:2551
#13 0x00000000007e7ed9 in expression_tree_mutator_impl (node0x1cf94c8, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3298
#14 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf94c8, context0x7ffdd8867f20) at clauses.c:3616
#15 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9518, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#16 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf9518, context0x7ffdd8867f20) at clauses.c:3616
#17 0x00000000008ae720 in eval_const_expressions (root0x1cf9638, node0x1cf9518) at clauses.c:2183
#18 0x0000000000885d2a in preprocess_expression (root0x1cf9638, expr0x1cf9518, kind1) at planner.c:1144
#19 0x0000000000885173 in subquery_planner (glob0x1cf8df8, parse0x1cf8f08, parent_root0x0, hasRecursionfalse, tuple_fraction0) at planner.c:811
#20 0x0000000000884293 in standard_planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:413
#21 0x000000000088403a in planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:281
#22 0x00000000009b5ec0 in pg_plan_query (querytree0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:904
#23 0x00000000009b600c in pg_plan_queries (querytrees0x1cf95e8, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:996
#24 0x00000000009b638c in exec_simple_query (query_string0x1cf7e68 select 1000abs(-10000)100;) at postgres.c:1193
#25 0x00000000009bab95 in PostgresMain (dbname0x1d2f2e8 postgres, username0x1cf3ac8 mingjie) at postgres.c:4637
#26 0x00000000008f1d6d in BackendRun (port0x1d25b70) at postmaster.c:4464
#27 0x00000000008f1706 in BackendStartup (port0x1d25b70) at postmaster.c:4192
#28 0x00000000008edfd1 in ServerLoop () at postmaster.c:1782
#29 0x00000000008ed9a1 in PostmasterMain (argc1, argv0x1cf1a70) at postmaster.c:1466
#30 0x00000000007b8201 in main (argc1, argv0x1cf1a70) at main.c:198第二次进入jit堆栈jit_compile_exprstate→expr (FuncExpr)表示100010000
因为不是parent表达式不再继续计算。
#0 jit_compile_expr (state0x1deae18) at jit.c:165
#1 0x000000000071fa6b in ExecReadyExpr (state0x1deae18) at execExpr.c:874
#2 0x000000000071e60b in ExecInitExpr (node0x1dfac58, parent0x0) at execExpr.c:152
#3 0x00000000008b3395 in evaluate_expr (expr0x1dfac58, result_type23, result_typmod-1, result_collation0) at clauses.c:4892
#4 0x00000000008b26f8 in evaluate_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args0x1dfaac8, funcvariadicfalse, func_tuple0x7fd9588876b8, context0x7ffdd8867f20) at clauses.c:4409
#5 0x00000000008b1a47 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8866248, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3997
#6 0x00000000008af028 in eval_const_expressions_mutator (node0x1cf9388, context0x7ffdd8867f20) at clauses.c:2551
#7 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9428, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#8 0x00000000008b1a05 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8866b38, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3988
#9 0x00000000008af028 in eval_const_expressions_mutator (node0x1cf9478, context0x7ffdd8867f20) at clauses.c:2551
#10 0x00000000007e7ed9 in expression_tree_mutator_impl (node0x1cf94c8, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3298
#11 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf94c8, context0x7ffdd8867f20) at clauses.c:3616
#12 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9518, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#13 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf9518, context0x7ffdd8867f20) at clauses.c:3616
#14 0x00000000008ae720 in eval_const_expressions (root0x1cf9638, node0x1cf9518) at clauses.c:2183
#15 0x0000000000885d2a in preprocess_expression (root0x1cf9638, expr0x1cf9518, kind1) at planner.c:1144
#16 0x0000000000885173 in subquery_planner (glob0x1cf8df8, parse0x1cf8f08, parent_root0x0, hasRecursionfalse, tuple_fraction0) at planner.c:811
#17 0x0000000000884293 in standard_planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:413
#18 0x000000000088403a in planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:281
#19 0x00000000009b5ec0 in pg_plan_query (querytree0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:904
#20 0x00000000009b600c in pg_plan_queries (querytrees0x1cf95e8, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:996
#21 0x00000000009b638c in exec_simple_query (query_string0x1cf7e68 select 1000abs(-10000)100;) at postgres.c:1193
#22 0x00000000009bab95 in PostgresMain (dbname0x1d2f2e8 postgres, username0x1cf3ac8 mingjie) at postgres.c:4637
#23 0x00000000008f1d6d in BackendRun (port0x1d25b70) at postmaster.c:4464
#24 0x00000000008f1706 in BackendStartup (port0x1d25b70) at postmaster.c:4192
#25 0x00000000008edfd1 in ServerLoop () at postmaster.c:1782
#26 0x00000000008ed9a1 in PostmasterMain (argc1, argv0x1cf1a70) at postmaster.c:1466
#27 0x00000000007b8201 in main (argc1, argv0x1cf1a70) at main.c:198第三次进入jit堆栈jit_compile_exprstate→expr (FuncExpr)表示11000100
因为不是parent表达式不再继续计算。
#0 jit_compile_expr (state0x1deae18) at jit.c:165
#1 0x000000000071fa6b in ExecReadyExpr (state0x1deae18) at execExpr.c:874
#2 0x000000000071e60b in ExecInitExpr (node0x1dfad98, parent0x0) at execExpr.c:152
#3 0x00000000008b3395 in evaluate_expr (expr0x1dfad98, result_type23, result_typmod-1, result_collation0) at clauses.c:4892
#4 0x00000000008b26f8 in evaluate_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args0x1dfacf8, funcvariadicfalse, func_tuple0x7fd9588876b8, context0x7ffdd8867f20) at clauses.c:4409
#5 0x00000000008b1a47 in simplify_function (funcid177, result_type23, result_typmod-1, result_collid0, input_collid0, args_p0x7ffdd8866b38, funcvariadicfalse, process_argstrue, allow_non_consttrue, context0x7ffdd8867f20) at clauses.c:3997
#6 0x00000000008af028 in eval_const_expressions_mutator (node0x1cf9478, context0x7ffdd8867f20) at clauses.c:2551
#7 0x00000000007e7ed9 in expression_tree_mutator_impl (node0x1cf94c8, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3298
#8 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf94c8, context0x7ffdd8867f20) at clauses.c:3616
#9 0x00000000007e82e4 in expression_tree_mutator_impl (node0x1cf9518, mutator0x8ae95b eval_const_expressions_mutator, context0x7ffdd8867f20) at nodeFuncs.c:3384
#10 0x00000000008b13ec in eval_const_expressions_mutator (node0x1cf9518, context0x7ffdd8867f20) at clauses.c:3616
#11 0x00000000008ae720 in eval_const_expressions (root0x1cf9638, node0x1cf9518) at clauses.c:2183
#12 0x0000000000885d2a in preprocess_expression (root0x1cf9638, expr0x1cf9518, kind1) at planner.c:1144
#13 0x0000000000885173 in subquery_planner (glob0x1cf8df8, parse0x1cf8f08, parent_root0x0, hasRecursionfalse, tuple_fraction0) at planner.c:811
#14 0x0000000000884293 in standard_planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:413
#15 0x000000000088403a in planner (parse0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at planner.c:281
#16 0x00000000009b5ec0 in pg_plan_query (querytree0x1cf8f08, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:904
#17 0x00000000009b600c in pg_plan_queries (querytrees0x1cf95e8, query_string0x1cf7e68 select 1000abs(-10000)100;, cursorOptions2048, boundParams0x0) at postgres.c:996
#18 0x00000000009b638c in exec_simple_query (query_string0x1cf7e68 select 1000abs(-10000)100;) at postgres.c:1193
#19 0x00000000009bab95 in PostgresMain (dbname0x1d2f2e8 postgres, username0x1cf3ac8 mingjie) at postgres.c:4637
#20 0x00000000008f1d6d in BackendRun (port0x1d25b70) at postmaster.c:4464
#21 0x00000000008f1706 in BackendStartup (port0x1d25b70) at postmaster.c:4192
#22 0x00000000008edfd1 in ServerLoop () at postmaster.c:1782
#23 0x00000000008ed9a1 in PostmasterMain (argc1, argv0x1cf1a70) at postmaster.c:1466
#24 0x00000000007b8201 in main (argc1, argv0x1cf1a70) at main.c:198第四次进入jit堆栈jit_compile_exprstate→expr (List)记录TargetEntry
TargetEntry的expr记录结果11100
{ xpr {type T_TargetEntry}, expr Const{constvalue 11100} ,resno 1, resname 0xcbfb88 ?column?, ressortgroupref 0, resorigtbl 0, resorigcol 0, resjunk false}进入jit_compile_expr→llvm_compile_expr开始编译表达式
#0 llvm_compile_expr (state0x1deb218) at llvmjit_expr.c:80
#1 0x0000000000bd3698 in jit_compile_expr (state0x1deb218) at jit.c:177
#2 0x000000000071fa6b in ExecReadyExpr (state0x1deb218) at execExpr.c:874
#3 0x000000000071eecb in ExecBuildProjectionInfo (targetList0x1dfb890, econtext0x1deaf40, slot0x1deb130, parent0x1deae30, inputDesc0x0) at execExpr.c:479
#4 0x0000000000749d1b in ExecAssignProjectionInfo (planstate0x1deae30, inputDesc0x0) at execUtils.c:547
#5 0x00000000007827d0 in ExecInitResult (node0x1dfb7b0, estate0x1deac08, eflags32) at nodeResult.c:221
#6 0x00000000007403d1 in ExecInitNode (node0x1dfb7b0, estate0x1deac08, eflags32) at execProcnode.c:167
#7 0x0000000000735daf in InitPlan (queryDesc0x1d1fb98, eflags32) at execMain.c:968
#8 0x0000000000734c85 in standard_ExecutorStart (queryDesc0x1d1fb98, eflags32) at execMain.c:266
#9 0x00000000007349fa in ExecutorStart (queryDesc0x1d1fb98, eflags0) at execMain.c:145
#10 0x00000000009bc3dc in PortalStart (portal0x1da1368, params0x0, eflags0, snapshot0x0) at pquery.c:517
#11 0x00000000009b6419 in exec_simple_query (query_string0x1cf7e68 select 1000abs(-10000)100;) at postgres.c:1235
#12 0x00000000009bab95 in PostgresMain (dbname0x1d2f2e8 postgres, username0x1cf3ac8 mingjie) at postgres.c:4637
#13 0x00000000008f1d6d in BackendRun (port0x1d25b70) at postmaster.c:4464
#14 0x00000000008f1706 in BackendStartup (port0x1d25b70) at postmaster.c:4192
#15 0x00000000008edfd1 in ServerLoop () at postmaster.c:1782
#16 0x00000000008ed9a1 in PostmasterMain (argc1, argv0x1cf1a70) at postmaster.c:1466
#17 0x00000000007b8201 in main (argc1, argv0x1cf1a70) at main.c:198llvm_compile_expr函数从功能来看是严格对标ExecInterpExpr表达式计算的例如计算函数表达式的结果EEOP_FUNCEXPR_STRICT分支
4 用例
set max_parallel_workers_per_gather to 0;
set jit_expressions to on;
set jit_tuple_deforming to on;
set jit_above_cost to 0;
set jit_inline_above_cost to 0;
set jit_optimize_above_cost to 0;
explain analyze select abs(-10000)1000100;
select 1000abs(-10000)100;