2 SET client_min_messages TO log;
3 \set SHOW_CONTEXT always
4 SET pg_hint_plan.debug_print TO on;
7 select * from t1 join t2 on t1.id = t2.id where '/*+HashJoin(t1 t2)*/' <> '';
9 set pg_hint_plan.hints_anywhere = on;
11 select * from t1 join t2 on t1.id = t2.id where '/*+HashJoin(t1 t2)*/' <> '';
13 set pg_hint_plan.hints_anywhere = off;
15 select * from t1 join t2 on t1.id = t2.id where '/*+HashJoin(t1 t2)*/' <> '';
17 set pg_hint_plan.hints_anywhere = on;
18 /*+ MergeJoin(t1 t2) */
20 select * from t1 join t2 on t1.val = t2.val where '/*+HashJoin(t1 t2)*/' <> '';
22 /*+ HashJoin(t1 t2) */
24 select * from t1 join t2 on t1.val = t2.val where '/*+MergeJoin(t1 t2)*/' <> '';