----+-----
(0 rows)
+-- all hint types together
+/*+ SeqScan(t1) MergeJoin(t1 t2) Leading(t1 t2) Rows(t1 t2 +10) Parallel(t1 8 hard) Set(random_page_cost 2.0)*/
+EXPLAIN (costs off) SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id) JOIN t3 ON (t3.id = t2.id);
+DEBUG: adjusted rows 1000 to 1010
+DEBUG: pg_hint_plan:
+used hint:
+SeqScan(t1)
+MergeJoin(t1 t2)
+Leading(t1 t2)
+Set(random_page_cost 2.0)
+Rows(t1 t2 +10)
+Parallel(t1 8 hard)
+not used hint:
+duplication hint:
+error hint:
+
+ QUERY PLAN
+-------------------------------------------------
+ Nested Loop
+ -> Merge Join
+ Merge Cond: (t2.id = t1.id)
+ -> Index Scan using t2_pkey on t2
+ -> Sort
+ Sort Key: t1.id
+ -> Gather
+ Workers Planned: 8
+ -> Parallel Seq Scan on t1
+ -> Index Scan using t3_pkey on t3
+ Index Cond: (id = t1.id)
+(11 rows)
+
hstate->num_hints[HINT_TYPE_LEADING]);
hstate->rows_hints = (RowsHint **) (hstate->set_hints +
hstate->num_hints[HINT_TYPE_SET]);
- hstate->parallel_hints = (ParallelHint **) (hstate->set_hints +
+ hstate->parallel_hints = (ParallelHint **) (hstate->rows_hints +
hstate->num_hints[HINT_TYPE_ROWS]);
return hstate;
/*+ SeqScan( */ SELECT 1;
/*+ SeqScan(t1) */ SELECT * FROM t1 LIMIT 0;
+-- all hint types together
+/*+ SeqScan(t1) MergeJoin(t1 t2) Leading(t1 t2) Rows(t1 t2 +10) Parallel(t1 8 hard) Set(random_page_cost 2.0)*/
+EXPLAIN (costs off) SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id) JOIN t3 ON (t3.id = t2.id);