• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

firtst release


Commit MetaInfo

修订版f1d323a5ae3d3175f0f4e16f89a68086f047c902 (tree)
时间2013-10-10 09:30:32
作者Takashi Suzuki <suzuki.takashi@metr...>
CommiterTakashi Suzuki

Log Message

PG92のみで動作するようにファイル構成を変更した。

更改概述

  • modified: Makefile (diff)
  • delete: SPECS/pg_hint_plan91.spec
  • delete: core-9.1.c
  • delete: core-9.2.c => core.c
  • modified: expected/.gitignore (diff)
  • delete: expected/base_plan-9.1.out
  • delete: expected/init-9.1.out
  • delete: expected/pg_hint_plan-9.1.out
  • delete: expected/ut-A-9.1.out
  • delete: expected/ut-G-9.1.out
  • delete: expected/ut-J-9.1.out
  • delete: expected/ut-L-9.1.out
  • delete: expected/ut-S-9.1.out
  • delete: expected/{base_plan-9.2.out => base_plan.out}
  • delete: expected/{init-9.2.out => init.out}
  • delete: expected/{pg_hint_plan-9.2.out => pg_hint_plan.out}
  • delete: expected/{ut-A-9.2.out => ut-A.out}
  • delete: expected/{ut-G-9.2.out => ut-G.out}
  • delete: expected/{ut-J-9.2.out => ut-J.out}
  • delete: expected/{ut-L-9.2.out => ut-L.out}
  • delete: expected/{ut-S-9.2.out => ut-S.out}
  • delete: plpgsql-9.1.h

差异

--- a/Makefile
+++ b/Makefile
@@ -14,18 +14,12 @@ REGRESS_OPTS = --encoding=UTF8
1414 EXTENSION = pg_hint_plan
1515 DATA = pg_hint_plan--1.0.sql
1616
17-EXTRA_CLEAN = core.c sql/ut-fdw.sql expected/ut-fdw.out $(REGRESSION_EXPECTED)
17+EXTRA_CLEAN = sql/ut-fdw.sql expected/ut-fdw.out
1818
1919 PG_CONFIG = pg_config
2020 PGXS := $(shell $(PG_CONFIG) --pgxs)
2121 include $(PGXS)
2222
23-core.c: core-$(MAJORVERSION).c
24- cp core-$(MAJORVERSION).c core.c
25-
26-$(REGRESSION_EXPECTED): %.out: %-$(MAJORVERSION).out
27- cp $< $@
28-
2923 installcheck: $(REGRESSION_EXPECTED)
3024
3125 # pg_hint_plan.c includes core.c and make_join_rel.c
--- a/SPECS/pg_hint_plan91.spec
+++ /dev/null
@@ -1,69 +0,0 @@
1-# SPEC file for pg_hint_plan
2-# Copyright(C) 2013 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3-
4-%define _pgdir /usr/pgsql-9.1
5-%define _bindir %{_pgdir}/bin
6-%define _libdir %{_pgdir}/lib
7-%define _datadir %{_pgdir}/share
8-
9-## Set general information for pg_hint_plan.
10-Summary: Optimizer hint for PostgreSQL 9.1
11-Name: pg_hint_plan91
12-Version: 1.1.0
13-Release: 1%{?dist}
14-License: BSD
15-Group: Applications/Databases
16-Source0: %{name}-%{version}.tar.gz
17-#URL: http://example.com/pg_hint_plan/
18-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
19-Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION
20-
21-## We use postgresql-devel package
22-BuildRequires: postgresql91-devel
23-Requires: postgresql91-libs
24-
25-## Description for "pg_hint_plan"
26-%description
27-pg_hint_plan provides capability to force arbitrary plan to PostgreSQL' planner
28-to optimize queries by hand directly.
29-
30-If you have query plan better than which PostgreSQL chooses, you can force your
31-plan by adding special comment block with optimizer hint before the query you
32-want to optimize. You can control scan method, join method, join order, and
33-planner-related GUC parameters during planning.
34-
35-Note that this package is available for only PostgreSQL 9.1.
36-
37-## pre work for build pg_hint_plan
38-%prep
39-%setup -q
40-
41-## Set variables for build environment
42-%build
43-make %{?_smp_mflags}
44-
45-## Set variables for install
46-%install
47-rm -rf %{buildroot}
48-install -d %{buildroot}%{_libdir}
49-install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so
50-install -d %{buildroot}%{_datadir}/extension
51-install -m 644 pg_hint_plan--1.0.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.0.sql
52-install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control
53-
54-%clean
55-rm -rf %{buildroot}
56-
57-%files
58-%defattr(0755,root,root)
59-%{_libdir}/pg_hint_plan.so
60-%defattr(0644,root,root)
61-%{_datadir}/extension/pg_hint_plan--1.0.sql
62-%{_datadir}/extension/pg_hint_plan.control
63-
64-# History of pg_hint_plan.
65-%changelog
66-* Mon Sep 02 2013 Takashi Suzuki
67-- Initial cut for 1.1.0
68-* Mon Sep 24 2012 Shigeru Hanada <shigeru.hanada@gmail.com>
69-- Initial cut for 1.0.0
--- a/core-9.1.c
+++ /dev/null
@@ -1,1124 +0,0 @@
1-/*-------------------------------------------------------------------------
2- *
3- * core.c
4- * Routines copied from PostgreSQL core distribution.
5- *
6- * src/backend/optimizer/path/allpaths.c
7- * set_append_rel_pathlist()
8- * accumulate_append_subpath()
9- * set_dummy_rel_pathlist()
10- * standard_join_search()
11- *
12- * src/backend/optimizer/path/joinrels.c
13- * join_search_one_level()
14- * make_rels_by_clause_joins()
15- * make_rels_by_clauseless_joins()
16- * join_is_legal()
17- * has_join_restriction()
18- * is_dummy_rel()
19- * mark_dummy_rel()
20- * restriction_is_constant_false()
21- *
22- * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
23- * Portions Copyright (c) 1994, Regents of the University of California
24- *
25- *-------------------------------------------------------------------------
26- */
27-
28-/*
29- * set_append_rel_pathlist
30- * Build access paths for an "append relation"
31- *
32- * The passed-in rel and RTE represent the entire append relation. The
33- * relation's contents are computed by appending together the output of
34- * the individual member relations. Note that in the inheritance case,
35- * the first member relation is actually the same table as is mentioned in
36- * the parent RTE ... but it has a different RTE and RelOptInfo. This is
37- * a good thing because their outputs are not the same size.
38- */
39-static void
40-set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
41- Index rti, RangeTblEntry *rte)
42-{
43- int parentRTindex = rti;
44- List *live_childrels = NIL;
45- List *subpaths = NIL;
46- List *all_child_pathkeys = NIL;
47- double parent_rows;
48- double parent_size;
49- double *parent_attrsizes;
50- int nattrs;
51- ListCell *l;
52-
53- /*
54- * Initialize to compute size estimates for whole append relation.
55- *
56- * We handle width estimates by weighting the widths of different child
57- * rels proportionally to their number of rows. This is sensible because
58- * the use of width estimates is mainly to compute the total relation
59- * "footprint" if we have to sort or hash it. To do this, we sum the
60- * total equivalent size (in "double" arithmetic) and then divide by the
61- * total rowcount estimate. This is done separately for the total rel
62- * width and each attribute.
63- *
64- * Note: if you consider changing this logic, beware that child rels could
65- * have zero rows and/or width, if they were excluded by constraints.
66- */
67- parent_rows = 0;
68- parent_size = 0;
69- nattrs = rel->max_attr - rel->min_attr + 1;
70- parent_attrsizes = (double *) palloc0(nattrs * sizeof(double));
71-
72- /*
73- * Generate access paths for each member relation, and pick the cheapest
74- * path for each one.
75- */
76- foreach(l, root->append_rel_list)
77- {
78- AppendRelInfo *appinfo = (AppendRelInfo *) lfirst(l);
79- int childRTindex;
80- RangeTblEntry *childRTE;
81- RelOptInfo *childrel;
82- List *childquals;
83- Node *childqual;
84- ListCell *lcp;
85- ListCell *parentvars;
86- ListCell *childvars;
87-
88- /* append_rel_list contains all append rels; ignore others */
89- if (appinfo->parent_relid != parentRTindex)
90- continue;
91-
92- childRTindex = appinfo->child_relid;
93- childRTE = root->simple_rte_array[childRTindex];
94-
95- /*
96- * The child rel's RelOptInfo was already created during
97- * add_base_rels_to_query.
98- */
99- childrel = find_base_rel(root, childRTindex);
100- Assert(childrel->reloptkind == RELOPT_OTHER_MEMBER_REL);
101-
102- /*
103- * We have to copy the parent's targetlist and quals to the child,
104- * with appropriate substitution of variables. However, only the
105- * baserestrictinfo quals are needed before we can check for
106- * constraint exclusion; so do that first and then check to see if we
107- * can disregard this child.
108- *
109- * As of 8.4, the child rel's targetlist might contain non-Var
110- * expressions, which means that substitution into the quals could
111- * produce opportunities for const-simplification, and perhaps even
112- * pseudoconstant quals. To deal with this, we strip the RestrictInfo
113- * nodes, do the substitution, do const-simplification, and then
114- * reconstitute the RestrictInfo layer.
115- */
116- childquals = get_all_actual_clauses(rel->baserestrictinfo);
117- childquals = (List *) adjust_appendrel_attrs((Node *) childquals,
118- appinfo);
119- childqual = eval_const_expressions(root, (Node *)
120- make_ands_explicit(childquals));
121- if (childqual && IsA(childqual, Const) &&
122- (((Const *) childqual)->constisnull ||
123- !DatumGetBool(((Const *) childqual)->constvalue)))
124- {
125- /*
126- * Restriction reduces to constant FALSE or constant NULL after
127- * substitution, so this child need not be scanned.
128- */
129- set_dummy_rel_pathlist(childrel);
130- continue;
131- }
132- childquals = make_ands_implicit((Expr *) childqual);
133- childquals = make_restrictinfos_from_actual_clauses(root,
134- childquals);
135- childrel->baserestrictinfo = childquals;
136-
137- if (relation_excluded_by_constraints(root, childrel, childRTE))
138- {
139- /*
140- * This child need not be scanned, so we can omit it from the
141- * appendrel. Mark it with a dummy cheapest-path though, in case
142- * best_appendrel_indexscan() looks at it later.
143- */
144- set_dummy_rel_pathlist(childrel);
145- continue;
146- }
147-
148- /*
149- * CE failed, so finish copying/modifying targetlist and join quals.
150- *
151- * Note: the resulting childrel->reltargetlist may contain arbitrary
152- * expressions, which normally would not occur in a reltargetlist.
153- * That is okay because nothing outside of this routine will look at
154- * the child rel's reltargetlist. We do have to cope with the case
155- * while constructing attr_widths estimates below, though.
156- */
157- childrel->joininfo = (List *)
158- adjust_appendrel_attrs((Node *) rel->joininfo,
159- appinfo);
160- childrel->reltargetlist = (List *)
161- adjust_appendrel_attrs((Node *) rel->reltargetlist,
162- appinfo);
163-
164- /*
165- * We have to make child entries in the EquivalenceClass data
166- * structures as well. This is needed either if the parent
167- * participates in some eclass joins (because we will want to consider
168- * inner-indexscan joins on the individual children) or if the parent
169- * has useful pathkeys (because we should try to build MergeAppend
170- * paths that produce those sort orderings).
171- */
172- if (rel->has_eclass_joins || has_useful_pathkeys(root, rel))
173- add_child_rel_equivalences(root, appinfo, rel, childrel);
174- childrel->has_eclass_joins = rel->has_eclass_joins;
175-
176- /*
177- * Note: we could compute appropriate attr_needed data for the child's
178- * variables, by transforming the parent's attr_needed through the
179- * translated_vars mapping. However, currently there's no need
180- * because attr_needed is only examined for base relations not
181- * otherrels. So we just leave the child's attr_needed empty.
182- */
183-
184- /* Remember which childrels are live, for MergeAppend logic below */
185- live_childrels = lappend(live_childrels, childrel);
186-
187- /*
188- * Compute the child's access paths, and add the cheapest one to the
189- * Append path we are constructing for the parent.
190- */
191- set_rel_pathlist(root, childrel, childRTindex, childRTE);
192-
193- subpaths = accumulate_append_subpath(subpaths,
194- childrel->cheapest_total_path);
195-
196- /*
197- * Collect a list of all the available path orderings for all the
198- * children. We use this as a heuristic to indicate which sort
199- * orderings we should build MergeAppend paths for.
200- */
201- foreach(lcp, childrel->pathlist)
202- {
203- Path *childpath = (Path *) lfirst(lcp);
204- List *childkeys = childpath->pathkeys;
205- ListCell *lpk;
206- bool found = false;
207-
208- /* Ignore unsorted paths */
209- if (childkeys == NIL)
210- continue;
211-
212- /* Have we already seen this ordering? */
213- foreach(lpk, all_child_pathkeys)
214- {
215- List *existing_pathkeys = (List *) lfirst(lpk);
216-
217- if (compare_pathkeys(existing_pathkeys,
218- childkeys) == PATHKEYS_EQUAL)
219- {
220- found = true;
221- break;
222- }
223- }
224- if (!found)
225- {
226- /* No, so add it to all_child_pathkeys */
227- all_child_pathkeys = lappend(all_child_pathkeys, childkeys);
228- }
229- }
230-
231- /*
232- * Accumulate size information from each child.
233- */
234- if (childrel->rows > 0)
235- {
236- parent_rows += childrel->rows;
237- parent_size += childrel->width * childrel->rows;
238-
239- /*
240- * Accumulate per-column estimates too. We need not do anything
241- * for PlaceHolderVars in the parent list. If child expression
242- * isn't a Var, or we didn't record a width estimate for it, we
243- * have to fall back on a datatype-based estimate.
244- *
245- * By construction, child's reltargetlist is 1-to-1 with parent's.
246- */
247- forboth(parentvars, rel->reltargetlist,
248- childvars, childrel->reltargetlist)
249- {
250- Var *parentvar = (Var *) lfirst(parentvars);
251- Node *childvar = (Node *) lfirst(childvars);
252-
253- if (IsA(parentvar, Var))
254- {
255- int pndx = parentvar->varattno - rel->min_attr;
256- int32 child_width = 0;
257-
258- if (IsA(childvar, Var))
259- {
260- int cndx = ((Var *) childvar)->varattno - childrel->min_attr;
261-
262- child_width = childrel->attr_widths[cndx];
263- }
264- if (child_width <= 0)
265- child_width = get_typavgwidth(exprType(childvar),
266- exprTypmod(childvar));
267- Assert(child_width > 0);
268- parent_attrsizes[pndx] += child_width * childrel->rows;
269- }
270- }
271- }
272- }
273-
274- /*
275- * Save the finished size estimates.
276- */
277- rel->rows = parent_rows;
278- if (parent_rows > 0)
279- {
280- int i;
281-
282- rel->width = rint(parent_size / parent_rows);
283- for (i = 0; i < nattrs; i++)
284- rel->attr_widths[i] = rint(parent_attrsizes[i] / parent_rows);
285- }
286- else
287- rel->width = 0; /* attr_widths should be zero already */
288-
289- /*
290- * Set "raw tuples" count equal to "rows" for the appendrel; needed
291- * because some places assume rel->tuples is valid for any baserel.
292- */
293- rel->tuples = parent_rows;
294-
295- pfree(parent_attrsizes);
296-
297- /*
298- * Next, build an unordered Append path for the rel. (Note: this is
299- * correct even if we have zero or one live subpath due to constraint
300- * exclusion.)
301- */
302- add_path(rel, (Path *) create_append_path(rel, subpaths));
303-
304- /*
305- * Next, build MergeAppend paths based on the collected list of child
306- * pathkeys. We consider both cheapest-startup and cheapest-total cases,
307- * ie, for each interesting ordering, collect all the cheapest startup
308- * subpaths and all the cheapest total paths, and build a MergeAppend path
309- * for each list.
310- */
311- foreach(l, all_child_pathkeys)
312- {
313- List *pathkeys = (List *) lfirst(l);
314- List *startup_subpaths = NIL;
315- List *total_subpaths = NIL;
316- bool startup_neq_total = false;
317- ListCell *lcr;
318-
319- /* Select the child paths for this ordering... */
320- foreach(lcr, live_childrels)
321- {
322- RelOptInfo *childrel = (RelOptInfo *) lfirst(lcr);
323- Path *cheapest_startup,
324- *cheapest_total;
325-
326- /* Locate the right paths, if they are available. */
327- cheapest_startup =
328- get_cheapest_path_for_pathkeys(childrel->pathlist,
329- pathkeys,
330- STARTUP_COST);
331- cheapest_total =
332- get_cheapest_path_for_pathkeys(childrel->pathlist,
333- pathkeys,
334- TOTAL_COST);
335-
336- /*
337- * If we can't find any paths with the right order just add the
338- * cheapest-total path; we'll have to sort it.
339- */
340- if (cheapest_startup == NULL)
341- cheapest_startup = childrel->cheapest_total_path;
342- if (cheapest_total == NULL)
343- cheapest_total = childrel->cheapest_total_path;
344-
345- /*
346- * Notice whether we actually have different paths for the
347- * "cheapest" and "total" cases; frequently there will be no point
348- * in two create_merge_append_path() calls.
349- */
350- if (cheapest_startup != cheapest_total)
351- startup_neq_total = true;
352-
353- startup_subpaths =
354- accumulate_append_subpath(startup_subpaths, cheapest_startup);
355- total_subpaths =
356- accumulate_append_subpath(total_subpaths, cheapest_total);
357- }
358-
359- /* ... and build the MergeAppend paths */
360- add_path(rel, (Path *) create_merge_append_path(root,
361- rel,
362- startup_subpaths,
363- pathkeys));
364- if (startup_neq_total)
365- add_path(rel, (Path *) create_merge_append_path(root,
366- rel,
367- total_subpaths,
368- pathkeys));
369- }
370-
371- /* Select cheapest path */
372- set_cheapest(rel);
373-}
374-
375-/*
376- * accumulate_append_subpath
377- * Add a subpath to the list being built for an Append or MergeAppend
378- *
379- * It's possible that the child is itself an Append path, in which case
380- * we can "cut out the middleman" and just add its child paths to our
381- * own list. (We don't try to do this earlier because we need to
382- * apply both levels of transformation to the quals.)
383- */
384-static List *
385-accumulate_append_subpath(List *subpaths, Path *path)
386-{
387- if (IsA(path, AppendPath))
388- {
389- AppendPath *apath = (AppendPath *) path;
390-
391- /* list_copy is important here to avoid sharing list substructure */
392- return list_concat(subpaths, list_copy(apath->subpaths));
393- }
394- else
395- return lappend(subpaths, path);
396-}
397-
398-/*
399- * set_dummy_rel_pathlist
400- * Build a dummy path for a relation that's been excluded by constraints
401- *
402- * Rather than inventing a special "dummy" path type, we represent this as an
403- * AppendPath with no members (see also IS_DUMMY_PATH macro).
404- */
405-static void
406-set_dummy_rel_pathlist(RelOptInfo *rel)
407-{
408- /* Set dummy size estimates --- we leave attr_widths[] as zeroes */
409- rel->rows = 0;
410- rel->width = 0;
411-
412- add_path(rel, (Path *) create_append_path(rel, NIL));
413-
414- /* Select cheapest path (pretty easy in this case...) */
415- set_cheapest(rel);
416-}
417-
418-/*
419- * standard_join_search
420- * Find possible joinpaths for a query by successively finding ways
421- * to join component relations into join relations.
422- *
423- * 'levels_needed' is the number of iterations needed, ie, the number of
424- * independent jointree items in the query. This is > 1.
425- *
426- * 'initial_rels' is a list of RelOptInfo nodes for each independent
427- * jointree item. These are the components to be joined together.
428- * Note that levels_needed == list_length(initial_rels).
429- *
430- * Returns the final level of join relations, i.e., the relation that is
431- * the result of joining all the original relations together.
432- * At least one implementation path must be provided for this relation and
433- * all required sub-relations.
434- *
435- * To support loadable plugins that modify planner behavior by changing the
436- * join searching algorithm, we provide a hook variable that lets a plugin
437- * replace or supplement this function. Any such hook must return the same
438- * final join relation as the standard code would, but it might have a
439- * different set of implementation paths attached, and only the sub-joinrels
440- * needed for these paths need have been instantiated.
441- *
442- * Note to plugin authors: the functions invoked during standard_join_search()
443- * modify root->join_rel_list and root->join_rel_hash. If you want to do more
444- * than one join-order search, you'll probably need to save and restore the
445- * original states of those data structures. See geqo_eval() for an example.
446- */
447-RelOptInfo *
448-standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
449-{
450- int lev;
451- RelOptInfo *rel;
452-
453- /*
454- * This function cannot be invoked recursively within any one planning
455- * problem, so join_rel_level[] can't be in use already.
456- */
457- Assert(root->join_rel_level == NULL);
458-
459- /*
460- * We employ a simple "dynamic programming" algorithm: we first find all
461- * ways to build joins of two jointree items, then all ways to build joins
462- * of three items (from two-item joins and single items), then four-item
463- * joins, and so on until we have considered all ways to join all the
464- * items into one rel.
465- *
466- * root->join_rel_level[j] is a list of all the j-item rels. Initially we
467- * set root->join_rel_level[1] to represent all the single-jointree-item
468- * relations.
469- */
470- root->join_rel_level = (List **) palloc0((levels_needed + 1) * sizeof(List *));
471-
472- root->join_rel_level[1] = initial_rels;
473-
474- for (lev = 2; lev <= levels_needed; lev++)
475- {
476- ListCell *lc;
477-
478- /*
479- * Determine all possible pairs of relations to be joined at this
480- * level, and build paths for making each one from every available
481- * pair of lower-level relations.
482- */
483- join_search_one_level(root, lev);
484-
485- /*
486- * Do cleanup work on each just-processed rel.
487- */
488- foreach(lc, root->join_rel_level[lev])
489- {
490- rel = (RelOptInfo *) lfirst(lc);
491-
492- /* Find and save the cheapest paths for this rel */
493- set_cheapest(rel);
494-
495-#ifdef OPTIMIZER_DEBUG
496- debug_print_rel(root, rel);
497-#endif
498- }
499- }
500-
501- /*
502- * We should have a single rel at the final level.
503- */
504- if (root->join_rel_level[levels_needed] == NIL)
505- elog(ERROR, "failed to build any %d-way joins", levels_needed);
506- Assert(list_length(root->join_rel_level[levels_needed]) == 1);
507-
508- rel = (RelOptInfo *) linitial(root->join_rel_level[levels_needed]);
509-
510- root->join_rel_level = NULL;
511-
512- return rel;
513-}
514-
515-/*
516- * join_search_one_level
517- * Consider ways to produce join relations containing exactly 'level'
518- * jointree items. (This is one step of the dynamic-programming method
519- * embodied in standard_join_search.) Join rel nodes for each feasible
520- * combination of lower-level rels are created and returned in a list.
521- * Implementation paths are created for each such joinrel, too.
522- *
523- * level: level of rels we want to make this time
524- * root->join_rel_level[j], 1 <= j < level, is a list of rels containing j items
525- *
526- * The result is returned in root->join_rel_level[level].
527- */
528-void
529-join_search_one_level(PlannerInfo *root, int level)
530-{
531- List **joinrels = root->join_rel_level;
532- ListCell *r;
533- int k;
534-
535- Assert(joinrels[level] == NIL);
536-
537- /* Set join_cur_level so that new joinrels are added to proper list */
538- root->join_cur_level = level;
539-
540- /*
541- * First, consider left-sided and right-sided plans, in which rels of
542- * exactly level-1 member relations are joined against initial relations.
543- * We prefer to join using join clauses, but if we find a rel of level-1
544- * members that has no join clauses, we will generate Cartesian-product
545- * joins against all initial rels not already contained in it.
546- *
547- * In the first pass (level == 2), we try to join each initial rel to each
548- * initial rel that appears later in joinrels[1]. (The mirror-image joins
549- * are handled automatically by make_join_rel.) In later passes, we try
550- * to join rels of size level-1 from joinrels[level-1] to each initial rel
551- * in joinrels[1].
552- */
553- foreach(r, joinrels[level - 1])
554- {
555- RelOptInfo *old_rel = (RelOptInfo *) lfirst(r);
556- ListCell *other_rels;
557-
558- if (level == 2)
559- other_rels = lnext(r); /* only consider remaining initial
560- * rels */
561- else
562- other_rels = list_head(joinrels[1]); /* consider all initial
563- * rels */
564-
565- if (old_rel->joininfo != NIL || old_rel->has_eclass_joins ||
566- has_join_restriction(root, old_rel))
567- {
568- /*
569- * Note that if all available join clauses for this rel require
570- * more than one other rel, we will fail to make any joins against
571- * it here. In most cases that's OK; it'll be considered by
572- * "bushy plan" join code in a higher-level pass where we have
573- * those other rels collected into a join rel.
574- *
575- * See also the last-ditch case below.
576- */
577- make_rels_by_clause_joins(root,
578- old_rel,
579- other_rels);
580- }
581- else
582- {
583- /*
584- * Oops, we have a relation that is not joined to any other
585- * relation, either directly or by join-order restrictions.
586- * Cartesian product time.
587- */
588- make_rels_by_clauseless_joins(root,
589- old_rel,
590- other_rels);
591- }
592- }
593-
594- /*
595- * Now, consider "bushy plans" in which relations of k initial rels are
596- * joined to relations of level-k initial rels, for 2 <= k <= level-2.
597- *
598- * We only consider bushy-plan joins for pairs of rels where there is a
599- * suitable join clause (or join order restriction), in order to avoid
600- * unreasonable growth of planning time.
601- */
602- for (k = 2;; k++)
603- {
604- int other_level = level - k;
605-
606- /*
607- * Since make_join_rel(x, y) handles both x,y and y,x cases, we only
608- * need to go as far as the halfway point.
609- */
610- if (k > other_level)
611- break;
612-
613- foreach(r, joinrels[k])
614- {
615- RelOptInfo *old_rel = (RelOptInfo *) lfirst(r);
616- ListCell *other_rels;
617- ListCell *r2;
618-
619- /*
620- * We can ignore clauseless joins here, *except* when they
621- * participate in join-order restrictions --- then we might have
622- * to force a bushy join plan.
623- */
624- if (old_rel->joininfo == NIL && !old_rel->has_eclass_joins &&
625- !has_join_restriction(root, old_rel))
626- continue;
627-
628- if (k == other_level)
629- other_rels = lnext(r); /* only consider remaining rels */
630- else
631- other_rels = list_head(joinrels[other_level]);
632-
633- for_each_cell(r2, other_rels)
634- {
635- RelOptInfo *new_rel = (RelOptInfo *) lfirst(r2);
636-
637- if (!bms_overlap(old_rel->relids, new_rel->relids))
638- {
639- /*
640- * OK, we can build a rel of the right level from this
641- * pair of rels. Do so if there is at least one usable
642- * join clause or a relevant join restriction.
643- */
644- if (have_relevant_joinclause(root, old_rel, new_rel) ||
645- have_join_order_restriction(root, old_rel, new_rel))
646- {
647- (void) make_join_rel(root, old_rel, new_rel);
648- }
649- }
650- }
651- }
652- }
653-
654- /*
655- * Last-ditch effort: if we failed to find any usable joins so far, force
656- * a set of cartesian-product joins to be generated. This handles the
657- * special case where all the available rels have join clauses but we
658- * cannot use any of those clauses yet. An example is
659- *
660- * SELECT * FROM a,b,c WHERE (a.f1 + b.f2 + c.f3) = 0;
661- *
662- * The join clause will be usable at level 3, but at level 2 we have no
663- * choice but to make cartesian joins. We consider only left-sided and
664- * right-sided cartesian joins in this case (no bushy).
665- */
666- if (joinrels[level] == NIL)
667- {
668- /*
669- * This loop is just like the first one, except we always call
670- * make_rels_by_clauseless_joins().
671- */
672- foreach(r, joinrels[level - 1])
673- {
674- RelOptInfo *old_rel = (RelOptInfo *) lfirst(r);
675- ListCell *other_rels;
676-
677- if (level == 2)
678- other_rels = lnext(r); /* only consider remaining initial
679- * rels */
680- else
681- other_rels = list_head(joinrels[1]); /* consider all initial
682- * rels */
683-
684- make_rels_by_clauseless_joins(root,
685- old_rel,
686- other_rels);
687- }
688-
689- /*----------
690- * When special joins are involved, there may be no legal way
691- * to make an N-way join for some values of N. For example consider
692- *
693- * SELECT ... FROM t1 WHERE
694- * x IN (SELECT ... FROM t2,t3 WHERE ...) AND
695- * y IN (SELECT ... FROM t4,t5 WHERE ...)
696- *
697- * We will flatten this query to a 5-way join problem, but there are
698- * no 4-way joins that join_is_legal() will consider legal. We have
699- * to accept failure at level 4 and go on to discover a workable
700- * bushy plan at level 5.
701- *
702- * However, if there are no special joins then join_is_legal() should
703- * never fail, and so the following sanity check is useful.
704- *----------
705- */
706- if (joinrels[level] == NIL && root->join_info_list == NIL)
707- elog(ERROR, "failed to build any %d-way joins", level);
708- }
709-}
710-
711-/*
712- * make_rels_by_clause_joins
713- * Build joins between the given relation 'old_rel' and other relations
714- * that participate in join clauses that 'old_rel' also participates in
715- * (or participate in join-order restrictions with it).
716- * The join rels are returned in root->join_rel_level[join_cur_level].
717- *
718- * Note: at levels above 2 we will generate the same joined relation in
719- * multiple ways --- for example (a join b) join c is the same RelOptInfo as
720- * (b join c) join a, though the second case will add a different set of Paths
721- * to it. This is the reason for using the join_rel_level mechanism, which
722- * automatically ensures that each new joinrel is only added to the list once.
723- *
724- * 'old_rel' is the relation entry for the relation to be joined
725- * 'other_rels': the first cell in a linked list containing the other
726- * rels to be considered for joining
727- *
728- * Currently, this is only used with initial rels in other_rels, but it
729- * will work for joining to joinrels too.
730- */
731-static void
732-make_rels_by_clause_joins(PlannerInfo *root,
733- RelOptInfo *old_rel,
734- ListCell *other_rels)
735-{
736- ListCell *l;
737-
738- for_each_cell(l, other_rels)
739- {
740- RelOptInfo *other_rel = (RelOptInfo *) lfirst(l);
741-
742- if (!bms_overlap(old_rel->relids, other_rel->relids) &&
743- (have_relevant_joinclause(root, old_rel, other_rel) ||
744- have_join_order_restriction(root, old_rel, other_rel)))
745- {
746- (void) make_join_rel(root, old_rel, other_rel);
747- }
748- }
749-}
750-
751-/*
752- * make_rels_by_clauseless_joins
753- * Given a relation 'old_rel' and a list of other relations
754- * 'other_rels', create a join relation between 'old_rel' and each
755- * member of 'other_rels' that isn't already included in 'old_rel'.
756- * The join rels are returned in root->join_rel_level[join_cur_level].
757- *
758- * 'old_rel' is the relation entry for the relation to be joined
759- * 'other_rels': the first cell of a linked list containing the
760- * other rels to be considered for joining
761- *
762- * Currently, this is only used with initial rels in other_rels, but it would
763- * work for joining to joinrels too.
764- */
765-static void
766-make_rels_by_clauseless_joins(PlannerInfo *root,
767- RelOptInfo *old_rel,
768- ListCell *other_rels)
769-{
770- ListCell *l;
771-
772- for_each_cell(l, other_rels)
773- {
774- RelOptInfo *other_rel = (RelOptInfo *) lfirst(l);
775-
776- if (!bms_overlap(other_rel->relids, old_rel->relids))
777- {
778- (void) make_join_rel(root, old_rel, other_rel);
779- }
780- }
781-}
782-
783-/*
784- * join_is_legal
785- * Determine whether a proposed join is legal given the query's
786- * join order constraints; and if it is, determine the join type.
787- *
788- * Caller must supply not only the two rels, but the union of their relids.
789- * (We could simplify the API by computing joinrelids locally, but this
790- * would be redundant work in the normal path through make_join_rel.)
791- *
792- * On success, *sjinfo_p is set to NULL if this is to be a plain inner join,
793- * else it's set to point to the associated SpecialJoinInfo node. Also,
794- * *reversed_p is set TRUE if the given relations need to be swapped to
795- * match the SpecialJoinInfo node.
796- */
797-static bool
798-join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
799- Relids joinrelids,
800- SpecialJoinInfo **sjinfo_p, bool *reversed_p)
801-{
802- SpecialJoinInfo *match_sjinfo;
803- bool reversed;
804- bool unique_ified;
805- bool is_valid_inner;
806- ListCell *l;
807-
808- /*
809- * Ensure output params are set on failure return. This is just to
810- * suppress uninitialized-variable warnings from overly anal compilers.
811- */
812- *sjinfo_p = NULL;
813- *reversed_p = false;
814-
815- /*
816- * If we have any special joins, the proposed join might be illegal; and
817- * in any case we have to determine its join type. Scan the join info
818- * list for conflicts.
819- */
820- match_sjinfo = NULL;
821- reversed = false;
822- unique_ified = false;
823- is_valid_inner = true;
824-
825- foreach(l, root->join_info_list)
826- {
827- SpecialJoinInfo *sjinfo = (SpecialJoinInfo *) lfirst(l);
828-
829- /*
830- * This special join is not relevant unless its RHS overlaps the
831- * proposed join. (Check this first as a fast path for dismissing
832- * most irrelevant SJs quickly.)
833- */
834- if (!bms_overlap(sjinfo->min_righthand, joinrelids))
835- continue;
836-
837- /*
838- * Also, not relevant if proposed join is fully contained within RHS
839- * (ie, we're still building up the RHS).
840- */
841- if (bms_is_subset(joinrelids, sjinfo->min_righthand))
842- continue;
843-
844- /*
845- * Also, not relevant if SJ is already done within either input.
846- */
847- if (bms_is_subset(sjinfo->min_lefthand, rel1->relids) &&
848- bms_is_subset(sjinfo->min_righthand, rel1->relids))
849- continue;
850- if (bms_is_subset(sjinfo->min_lefthand, rel2->relids) &&
851- bms_is_subset(sjinfo->min_righthand, rel2->relids))
852- continue;
853-
854- /*
855- * If it's a semijoin and we already joined the RHS to any other rels
856- * within either input, then we must have unique-ified the RHS at that
857- * point (see below). Therefore the semijoin is no longer relevant in
858- * this join path.
859- */
860- if (sjinfo->jointype == JOIN_SEMI)
861- {
862- if (bms_is_subset(sjinfo->syn_righthand, rel1->relids) &&
863- !bms_equal(sjinfo->syn_righthand, rel1->relids))
864- continue;
865- if (bms_is_subset(sjinfo->syn_righthand, rel2->relids) &&
866- !bms_equal(sjinfo->syn_righthand, rel2->relids))
867- continue;
868- }
869-
870- /*
871- * If one input contains min_lefthand and the other contains
872- * min_righthand, then we can perform the SJ at this join.
873- *
874- * Barf if we get matches to more than one SJ (is that possible?)
875- */
876- if (bms_is_subset(sjinfo->min_lefthand, rel1->relids) &&
877- bms_is_subset(sjinfo->min_righthand, rel2->relids))
878- {
879- if (match_sjinfo)
880- return false; /* invalid join path */
881- match_sjinfo = sjinfo;
882- reversed = false;
883- }
884- else if (bms_is_subset(sjinfo->min_lefthand, rel2->relids) &&
885- bms_is_subset(sjinfo->min_righthand, rel1->relids))
886- {
887- if (match_sjinfo)
888- return false; /* invalid join path */
889- match_sjinfo = sjinfo;
890- reversed = true;
891- }
892- else if (sjinfo->jointype == JOIN_SEMI &&
893- bms_equal(sjinfo->syn_righthand, rel2->relids) &&
894- create_unique_path(root, rel2, rel2->cheapest_total_path,
895- sjinfo) != NULL)
896- {
897- /*----------
898- * For a semijoin, we can join the RHS to anything else by
899- * unique-ifying the RHS (if the RHS can be unique-ified).
900- * We will only get here if we have the full RHS but less
901- * than min_lefthand on the LHS.
902- *
903- * The reason to consider such a join path is exemplified by
904- * SELECT ... FROM a,b WHERE (a.x,b.y) IN (SELECT c1,c2 FROM c)
905- * If we insist on doing this as a semijoin we will first have
906- * to form the cartesian product of A*B. But if we unique-ify
907- * C then the semijoin becomes a plain innerjoin and we can join
908- * in any order, eg C to A and then to B. When C is much smaller
909- * than A and B this can be a huge win. So we allow C to be
910- * joined to just A or just B here, and then make_join_rel has
911- * to handle the case properly.
912- *
913- * Note that actually we'll allow unique-ified C to be joined to
914- * some other relation D here, too. That is legal, if usually not
915- * very sane, and this routine is only concerned with legality not
916- * with whether the join is good strategy.
917- *----------
918- */
919- if (match_sjinfo)
920- return false; /* invalid join path */
921- match_sjinfo = sjinfo;
922- reversed = false;
923- unique_ified = true;
924- }
925- else if (sjinfo->jointype == JOIN_SEMI &&
926- bms_equal(sjinfo->syn_righthand, rel1->relids) &&
927- create_unique_path(root, rel1, rel1->cheapest_total_path,
928- sjinfo) != NULL)
929- {
930- /* Reversed semijoin case */
931- if (match_sjinfo)
932- return false; /* invalid join path */
933- match_sjinfo = sjinfo;
934- reversed = true;
935- unique_ified = true;
936- }
937- else
938- {
939- /*----------
940- * Otherwise, the proposed join overlaps the RHS but isn't
941- * a valid implementation of this SJ. It might still be
942- * a legal join, however. If both inputs overlap the RHS,
943- * assume that it's OK. Since the inputs presumably got past
944- * this function's checks previously, they can't overlap the
945- * LHS and their violations of the RHS boundary must represent
946- * SJs that have been determined to commute with this one.
947- * We have to allow this to work correctly in cases like
948- * (a LEFT JOIN (b JOIN (c LEFT JOIN d)))
949- * when the c/d join has been determined to commute with the join
950- * to a, and hence d is not part of min_righthand for the upper
951- * join. It should be legal to join b to c/d but this will appear
952- * as a violation of the upper join's RHS.
953- * Furthermore, if one input overlaps the RHS and the other does
954- * not, we should still allow the join if it is a valid
955- * implementation of some other SJ. We have to allow this to
956- * support the associative identity
957- * (a LJ b on Pab) LJ c ON Pbc = a LJ (b LJ c ON Pbc) on Pab
958- * since joining B directly to C violates the lower SJ's RHS.
959- * We assume that make_outerjoininfo() set things up correctly
960- * so that we'll only match to some SJ if the join is valid.
961- * Set flag here to check at bottom of loop.
962- *----------
963- */
964- if (sjinfo->jointype != JOIN_SEMI &&
965- bms_overlap(rel1->relids, sjinfo->min_righthand) &&
966- bms_overlap(rel2->relids, sjinfo->min_righthand))
967- {
968- /* seems OK */
969- Assert(!bms_overlap(joinrelids, sjinfo->min_lefthand));
970- }
971- else
972- is_valid_inner = false;
973- }
974- }
975-
976- /*
977- * Fail if violated some SJ's RHS and didn't match to another SJ. However,
978- * "matching" to a semijoin we are implementing by unique-ification
979- * doesn't count (think: it's really an inner join).
980- */
981- if (!is_valid_inner &&
982- (match_sjinfo == NULL || unique_ified))
983- return false; /* invalid join path */
984-
985- /* Otherwise, it's a valid join */
986- *sjinfo_p = match_sjinfo;
987- *reversed_p = reversed;
988- return true;
989-}
990-
991-/*
992- * has_join_restriction
993- * Detect whether the specified relation has join-order restrictions
994- * due to being inside an outer join or an IN (sub-SELECT).
995- *
996- * Essentially, this tests whether have_join_order_restriction() could
997- * succeed with this rel and some other one. It's OK if we sometimes
998- * say "true" incorrectly. (Therefore, we don't bother with the relatively
999- * expensive has_legal_joinclause test.)
1000- */
1001-static bool
1002-has_join_restriction(PlannerInfo *root, RelOptInfo *rel)
1003-{
1004- ListCell *l;
1005-
1006- foreach(l, root->join_info_list)
1007- {
1008- SpecialJoinInfo *sjinfo = (SpecialJoinInfo *) lfirst(l);
1009-
1010- /* ignore full joins --- other mechanisms preserve their ordering */
1011- if (sjinfo->jointype == JOIN_FULL)
1012- continue;
1013-
1014- /* ignore if SJ is already contained in rel */
1015- if (bms_is_subset(sjinfo->min_lefthand, rel->relids) &&
1016- bms_is_subset(sjinfo->min_righthand, rel->relids))
1017- continue;
1018-
1019- /* restricted if it overlaps LHS or RHS, but doesn't contain SJ */
1020- if (bms_overlap(sjinfo->min_lefthand, rel->relids) ||
1021- bms_overlap(sjinfo->min_righthand, rel->relids))
1022- return true;
1023- }
1024-
1025- return false;
1026-}
1027-
1028-/*
1029- * is_dummy_rel --- has relation been proven empty?
1030- *
1031- * If so, it will have a single path that is dummy.
1032- */
1033-static bool
1034-is_dummy_rel(RelOptInfo *rel)
1035-{
1036- return (rel->cheapest_total_path != NULL &&
1037- IS_DUMMY_PATH(rel->cheapest_total_path));
1038-}
1039-
1040-/*
1041- * Mark a relation as proven empty.
1042- *
1043- * During GEQO planning, this can get invoked more than once on the same
1044- * baserel struct, so it's worth checking to see if the rel is already marked
1045- * dummy.
1046- *
1047- * Also, when called during GEQO join planning, we are in a short-lived
1048- * memory context. We must make sure that the dummy path attached to a
1049- * baserel survives the GEQO cycle, else the baserel is trashed for future
1050- * GEQO cycles. On the other hand, when we are marking a joinrel during GEQO,
1051- * we don't want the dummy path to clutter the main planning context. Upshot
1052- * is that the best solution is to explicitly make the dummy path in the same
1053- * context the given RelOptInfo is in.
1054- */
1055-static void
1056-mark_dummy_rel(RelOptInfo *rel)
1057-{
1058- MemoryContext oldcontext;
1059-
1060- /* Already marked? */
1061- if (is_dummy_rel(rel))
1062- return;
1063-
1064- /* No, so choose correct context to make the dummy path in */
1065- oldcontext = MemoryContextSwitchTo(GetMemoryChunkContext(rel));
1066-
1067- /* Set dummy size estimate */
1068- rel->rows = 0;
1069-
1070- /* Evict any previously chosen paths */
1071- rel->pathlist = NIL;
1072-
1073- /* Set up the dummy path */
1074- add_path(rel, (Path *) create_append_path(rel, NIL));
1075-
1076- /* Set or update cheapest_total_path */
1077- set_cheapest(rel);
1078-
1079- MemoryContextSwitchTo(oldcontext);
1080-}
1081-
1082-/*
1083- * restriction_is_constant_false --- is a restrictlist just FALSE?
1084- *
1085- * In cases where a qual is provably constant FALSE, eval_const_expressions
1086- * will generally have thrown away anything that's ANDed with it. In outer
1087- * join situations this will leave us computing cartesian products only to
1088- * decide there's no match for an outer row, which is pretty stupid. So,
1089- * we need to detect the case.
1090- *
1091- * If only_pushed_down is TRUE, then consider only pushed-down quals.
1092- */
1093-static bool
1094-restriction_is_constant_false(List *restrictlist, bool only_pushed_down)
1095-{
1096- ListCell *lc;
1097-
1098- /*
1099- * Despite the above comment, the restriction list we see here might
1100- * possibly have other members besides the FALSE constant, since other
1101- * quals could get "pushed down" to the outer join level. So we check
1102- * each member of the list.
1103- */
1104- foreach(lc, restrictlist)
1105- {
1106- RestrictInfo *rinfo = (RestrictInfo *) lfirst(lc);
1107-
1108- Assert(IsA(rinfo, RestrictInfo));
1109- if (only_pushed_down && !rinfo->is_pushed_down)
1110- continue;
1111-
1112- if (rinfo->clause && IsA(rinfo->clause, Const))
1113- {
1114- Const *con = (Const *) rinfo->clause;
1115-
1116- /* constant NULL is as good as constant FALSE for our purposes */
1117- if (con->constisnull)
1118- return true;
1119- if (!DatumGetBool(con->constvalue))
1120- return true;
1121- }
1122- }
1123- return false;
1124-}
--- a/expected/.gitignore
+++ b/expected/.gitignore
@@ -1,12 +1 @@
1-base_plan.out
21 fdw.out
3-init.out
4-pg_hint_plan.out
5-ut-A.out
6-ut-A2.out
7-ut-G.out
8-ut-J.out
9-ut-L.out
10-ut-S.out
11-indexonly.out
12-create_execute.out
--- a/expected/base_plan-9.1.out
+++ /dev/null
@@ -1,77 +0,0 @@
1-SET search_path TO public;
2--- query type 1
3-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
4- QUERY PLAN
5---------------------------------------
6- Merge Join
7- Merge Cond: (t1.id = t2.id)
8- -> Index Scan using t1_pkey on t1
9- -> Index Scan using t2_pkey on t2
10-(4 rows)
11-
12--- query type 2
13-EXPLAIN (COSTS false) SELECT * FROM t1, t4 WHERE t1.val < 10;
14- QUERY PLAN
15------------------------------------------
16- Nested Loop
17- -> Bitmap Heap Scan on t1
18- Recheck Cond: (val < 10)
19- -> Bitmap Index Scan on t1_val
20- Index Cond: (val < 10)
21- -> Materialize
22- -> Seq Scan on t4
23-(7 rows)
24-
25--- query type 3
26-EXPLAIN (COSTS false) SELECT * FROM t3, t4 WHERE t3.id = t4.id AND t4.ctid = '(1,1)';
27- QUERY PLAN
28----------------------------------------------
29- Merge Join
30- Merge Cond: (t3.id = t4.id)
31- -> Index Scan using t3_pkey on t3
32- -> Sort
33- Sort Key: t4.id
34- -> Seq Scan on t4
35- Filter: (ctid = '(1,1)'::tid)
36-(7 rows)
37-
38--- query type 4
39-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)';
40- QUERY PLAN
41------------------------------------------
42- Nested Loop
43- -> Tid Scan on t1
44- TID Cond: (ctid = '(1,1)'::tid)
45- -> Index Scan using t2_pkey on t2
46- Index Cond: (id = t1.id)
47-(5 rows)
48-
49--- query type 5
50-EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
51- QUERY PLAN
52---------------------------------
53- Hash Join
54- Hash Cond: (t1.val = t3.val)
55- -> Seq Scan on t1
56- -> Hash
57- -> Seq Scan on t3
58-(5 rows)
59-
60--- query type 6
61-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
62- QUERY PLAN
63---------------------------------------------------
64- Merge Join
65- Merge Cond: (t1.id = t4.id)
66- -> Merge Join
67- Merge Cond: (t1.id = t3.id)
68- -> Merge Join
69- Merge Cond: (t1.id = t2.id)
70- -> Index Scan using t1_pkey on t1
71- -> Index Scan using t2_pkey on t2
72- -> Index Scan using t3_pkey on t3
73- -> Sort
74- Sort Key: t4.id
75- -> Seq Scan on t4
76-(12 rows)
77-
--- a/expected/init-9.1.out
+++ /dev/null
@@ -1,209 +0,0 @@
1-SET search_path TO public;
2-CREATE EXTENSION pg_hint_plan;
3-CREATE SCHEMA s0;
4-CREATE TABLE t1 (id int PRIMARY KEY, val int);
5-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
6-CREATE TABLE t2 (id int PRIMARY KEY, val int);
7-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t2_pkey" for table "t2"
8-CREATE TABLE t3 (id int PRIMARY KEY, val int);
9-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t3_pkey" for table "t3"
10-CREATE TABLE t4 (id int PRIMARY KEY, val int);
11-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t4_pkey" for table "t4"
12-CREATE TABLE t5 (id int PRIMARY KEY, val int);
13-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t5_pkey" for table "t5"
14-CREATE TABLE p1 (id int PRIMARY KEY, val int);
15-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_pkey" for table "p1"
16-CREATE TABLE p1_c1 (LIKE p1 INCLUDING ALL, CHECK (id <= 100)) INHERITS(p1);
17-NOTICE: merging column "id" with inherited definition
18-NOTICE: merging column "val" with inherited definition
19-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c1_pkey" for table "p1_c1"
20-CREATE TABLE p1_c2 (LIKE p1 INCLUDING ALL, CHECK (id > 100 AND id <= 200)) INHERITS(p1);
21-NOTICE: merging column "id" with inherited definition
22-NOTICE: merging column "val" with inherited definition
23-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c2_pkey" for table "p1_c2"
24-CREATE TABLE p1_c3 (LIKE p1 INCLUDING ALL, CHECK (id > 200 AND id <= 300)) INHERITS(p1);
25-NOTICE: merging column "id" with inherited definition
26-NOTICE: merging column "val" with inherited definition
27-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c3_pkey" for table "p1_c3"
28-CREATE TABLE p1_c4 (LIKE p1 INCLUDING ALL, CHECK (id > 300)) INHERITS(p1);
29-NOTICE: merging column "id" with inherited definition
30-NOTICE: merging column "val" with inherited definition
31-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c4_pkey" for table "p1_c4"
32-CREATE TABLE p1_c1_c1 (LIKE p1 INCLUDING ALL, CHECK (id <= 50)) INHERITS(p1_c1);
33-NOTICE: merging column "id" with inherited definition
34-NOTICE: merging column "val" with inherited definition
35-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c1_c1_pkey" for table "p1_c1_c1"
36-CREATE TABLE p1_c1_c2 (LIKE p1 INCLUDING ALL, CHECK (id > 50 AND id <= 100)) INHERITS(p1_c1);
37-NOTICE: merging column "id" with inherited definition
38-NOTICE: merging column "val" with inherited definition
39-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c1_c2_pkey" for table "p1_c1_c2"
40-CREATE TABLE p1_c3_c1 (LIKE p1 INCLUDING ALL, CHECK (id > 200 AND id <= 250)) INHERITS(p1_c3);
41-NOTICE: merging column "id" with inherited definition
42-NOTICE: merging column "val" with inherited definition
43-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c3_c1_pkey" for table "p1_c3_c1"
44-CREATE TABLE p1_c3_c2 (LIKE p1 INCLUDING ALL, CHECK (id > 250 AND id <= 300)) INHERITS(p1_c3);
45-NOTICE: merging column "id" with inherited definition
46-NOTICE: merging column "val" with inherited definition
47-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p1_c3_c2_pkey" for table "p1_c3_c2"
48-CREATE TABLE p2 (id int PRIMARY KEY, val text);
49-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_pkey" for table "p2"
50-CREATE INDEX p2_id_val_idx ON p2 (id, val);
51-CREATE UNIQUE INDEX p2_val_idx ON p2 (val);
52-CREATE INDEX p2_ununi_id_val_idx ON p2 (val);
53-CREATE INDEX p2_val_idx_1 ON p2 USING hash (val);
54-CREATE INDEX p2_val_id_idx ON p2 (val, id);
55-CREATE INDEX p2_val_idx2 ON p2 (val COLLATE "ja_JP");
56-CREATE INDEX p2_val_idx3 ON p2 (val varchar_ops);
57-CREATE INDEX p2_val_idx4 ON p2 (val DESC NULLS LAST);
58-CREATE INDEX p2_val_idx5 ON p2 (val NULLS FIRST);
59-CREATE INDEX p2_expr ON p2 ((val < '120'));
60-CREATE INDEX p2_expr2 ON p2 ((id * 2 < 120));
61-CREATE INDEX p2_val_idx6 ON p2 (val) WHERE val >= '50' AND val < '51';
62-CREATE INDEX p2_val_idx7 ON p2 (val) WHERE id < 120;
63-CREATE TABLE p2_c1 (LIKE p2 INCLUDING ALL, CHECK (id <= 100)) INHERITS(p2);
64-NOTICE: merging column "id" with inherited definition
65-NOTICE: merging column "val" with inherited definition
66-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c1_pkey" for table "p2_c1"
67-CREATE TABLE p2_c2 (LIKE p2 INCLUDING ALL, CHECK (id > 100 AND id <= 200)) INHERITS(p2);
68-NOTICE: merging column "id" with inherited definition
69-NOTICE: merging column "val" with inherited definition
70-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c2_pkey" for table "p2_c2"
71-CREATE TABLE p2_c3 (LIKE p2 INCLUDING ALL, CHECK (id > 200 AND id <= 300)) INHERITS(p2);
72-NOTICE: merging column "id" with inherited definition
73-NOTICE: merging column "val" with inherited definition
74-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c3_pkey" for table "p2_c3"
75-CREATE TABLE p2_c4 (LIKE p2 INCLUDING ALL, CHECK (id > 300)) INHERITS(p2);
76-NOTICE: merging column "id" with inherited definition
77-NOTICE: merging column "val" with inherited definition
78-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c4_pkey" for table "p2_c4"
79-CREATE TABLE p2_c1_c1 (LIKE p2 INCLUDING ALL, CHECK (id <= 50)) INHERITS(p2_c1);
80-NOTICE: merging column "id" with inherited definition
81-NOTICE: merging column "val" with inherited definition
82-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c1_c1_pkey" for table "p2_c1_c1"
83-CREATE TABLE p2_c1_c2 (LIKE p2 INCLUDING ALL, CHECK (id > 50 AND id <= 100)) INHERITS(p2_c1);
84-NOTICE: merging column "id" with inherited definition
85-NOTICE: merging column "val" with inherited definition
86-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c1_c2_pkey" for table "p2_c1_c2"
87-CREATE TABLE p2_c3_c1 (LIKE p2 INCLUDING ALL, CHECK (id > 200 AND id <= 250)) INHERITS(p2_c3);
88-NOTICE: merging column "id" with inherited definition
89-NOTICE: merging column "val" with inherited definition
90-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c3_c1_pkey" for table "p2_c3_c1"
91-CREATE TABLE p2_c3_c2 (LIKE p2 INCLUDING ALL, CHECK (id > 250 AND id <= 300)) INHERITS(p2_c3);
92-NOTICE: merging column "id" with inherited definition
93-NOTICE: merging column "val" with inherited definition
94-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "p2_c3_c2_pkey" for table "p2_c3_c2"
95-CREATE TABLE s0.t1 (id int PRIMARY KEY, val int);
96-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
97-INSERT INTO t1 SELECT i, i % 100 FROM (SELECT generate_series(1, 10000) i) t;
98-INSERT INTO t2 SELECT i, i % 10 FROM (SELECT generate_series(1, 1000) i) t;
99-INSERT INTO t3 SELECT i, i FROM (SELECT generate_series(1, 100) i) t;
100-INSERT INTO t4 SELECT i, i FROM (SELECT generate_series(1, 10) i) t;
101-INSERT INTO t5 SELECT i, i % 100 FROM (SELECT generate_series(1, 10000) i) t;
102-INSERT INTO p1_c1_c1 SELECT i, i % 100 FROM (SELECT generate_series(1, 50) i) t;
103-INSERT INTO p1_c1_c2 SELECT i, i % 100 FROM (SELECT generate_series(51, 100) i) t;
104-INSERT INTO p1_c2 SELECT i, i % 100 FROM (SELECT generate_series(101, 200) i) t;
105-INSERT INTO p1_c3_c1 SELECT i, i % 100 FROM (SELECT generate_series(201, 250) i) t;
106-INSERT INTO p1_c3_c2 SELECT i, i % 100 FROM (SELECT generate_series(251, 300) i) t;
107-INSERT INTO p1_c4 SELECT i, i % 100 FROM (SELECT generate_series(301, 400) i) t;
108-INSERT INTO p2_c1_c1 SELECT i, i % 100 FROM (SELECT generate_series(1, 50) i) t;
109-INSERT INTO p2_c1_c2 SELECT i, i % 100 FROM (SELECT generate_series(51, 100) i) t;
110-INSERT INTO p2_c2 SELECT i, i % 100 FROM (SELECT generate_series(101, 200) i) t;
111-INSERT INTO p2_c3_c1 SELECT i, i % 100 FROM (SELECT generate_series(201, 250) i) t;
112-INSERT INTO p2_c3_c2 SELECT i, i % 100 FROM (SELECT generate_series(251, 300) i) t;
113-INSERT INTO p2_c4 SELECT i, i % 100 FROM (SELECT generate_series(301, 400) i) t;
114-CREATE INDEX t1_val ON t1 (val);
115-CREATE INDEX t2_val ON t2 (val);
116-CREATE INDEX t5_id1 ON t5 (id);
117-CREATE INDEX t5_id2 ON t5 (id);
118-CREATE INDEX t5_id3 ON t5 (id);
119-CREATE INDEX t5_val ON t5 (val);
120-DROP INDEX p2_c4_val_id_idx;
121-CREATE INDEX p2_id2_val ON p2 (id, id, val);
122-CREATE INDEX p2_c1_id2_val ON p2_c1 (id, id, val);
123-CREATE INDEX p2_c2_id2_val ON p2_c2 (id, id, val);
124-CREATE INDEX p2_val2_id ON p2 (val, id, val);
125-CREATE INDEX t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ON t5 (id);
126-CREATE INDEX p1_val1 ON p1 (val);
127-CREATE INDEX p1_val2 ON p1 (val);
128-CREATE INDEX p1_val3 ON p1 (val);
129-CREATE INDEX p1_c1_val1 ON p1_c1 (val);
130-CREATE INDEX p1_c1_val2 ON p1_c1 (val);
131-CREATE INDEX p1_c1_val3 ON p1_c1 (val);
132-CREATE INDEX p1_c1_c1_val1 ON p1_c1_c1 (val);
133-CREATE INDEX p1_c1_c1_val2 ON p1_c1_c1 (val);
134-CREATE INDEX p1_c1_c1_val3 ON p1_c1_c1 (val);
135-CREATE INDEX p1_c1_c2_val1 ON p1_c1_c2 (val);
136-CREATE INDEX p1_c1_c2_val2 ON p1_c1_c2 (val);
137-CREATE INDEX p1_c1_c2_val3 ON p1_c1_c2 (val);
138-CREATE INDEX p1_c2_val1 ON p1_c2 (val);
139-CREATE INDEX p1_c2_val2 ON p1_c2 (val);
140-CREATE INDEX p1_c2_val3 ON p1_c2 (val);
141-CREATE INDEX p1_c3_val1 ON p1_c3 (val);
142-CREATE INDEX p1_c3_val2 ON p1_c3 (val);
143-CREATE INDEX p1_c3_val3 ON p1_c3 (val);
144-CREATE INDEX p1_c3_c1_val1 ON p1_c3_c1 (val);
145-CREATE INDEX p1_c3_c1_val2 ON p1_c3_c1 (val);
146-CREATE INDEX p1_c3_c1_val3 ON p1_c3_c1 (val);
147-CREATE INDEX p1_c3_c2_val1 ON p1_c3_c2 (val);
148-CREATE INDEX p1_c3_c2_val2 ON p1_c3_c2 (val);
149-CREATE INDEX p1_c3_c2_val3 ON p1_c3_c2 (val);
150-CREATE INDEX p1_c4_val1 ON p1_c4 (val);
151-CREATE INDEX p1_c4_val2 ON p1_c4 (val);
152-CREATE INDEX p1_c4_val3 ON p1_c4 (val);
153-ANALYZE t1;
154-ANALYZE t2;
155-ANALYZE t3;
156-ANALYZE t4;
157-ANALYZE t5;
158-ANALYZE p1;
159-ANALYZE p1_c1;
160-ANALYZE p1_c2;
161-ANALYZE p2;
162-CREATE VIEW v1 AS SELECT id, val FROM t1;
163-CREATE VIEW v2 AS SELECT t1.id t1_id, t1.val t1_val, t2.id t2_id, t2.val t2_val FROM t1, t2 WHERE t1.id = t2.id;
164-CREATE VIEW v3 AS SELECT t_1.id t1_id, t_1.val t1_val, t_2.id t2_id, t_2.val t2_val FROM t1 t_1, t2 t_2 WHERE t_1.id = t_2.id;
165-CREATE VIEW v4 AS SELECT v_2.t1_id, t_3.id FROM v2 v_2, t3 t_3 WHERE v_2.t1_id = t_3.id;
166-/*
167- * The following GUC parameters need the setting of the default value to
168- * succeed in regression test.
169- */
170-CREATE VIEW settings AS
171-SELECT name, setting, category
172- FROM pg_settings
173- WHERE category LIKE 'Query Tuning%'
174- OR name = 'client_min_messages'
175- ORDER BY category, name;
176-SELECT * FROM settings;
177- name | setting | category
178----------------------------+-----------+---------------------------------------------
179- geqo | on | Query Tuning / Genetic Query Optimizer
180- geqo_effort | 5 | Query Tuning / Genetic Query Optimizer
181- geqo_generations | 0 | Query Tuning / Genetic Query Optimizer
182- geqo_pool_size | 0 | Query Tuning / Genetic Query Optimizer
183- geqo_seed | 0 | Query Tuning / Genetic Query Optimizer
184- geqo_selection_bias | 2 | Query Tuning / Genetic Query Optimizer
185- geqo_threshold | 12 | Query Tuning / Genetic Query Optimizer
186- constraint_exclusion | partition | Query Tuning / Other Planner Options
187- cursor_tuple_fraction | 0.1 | Query Tuning / Other Planner Options
188- default_statistics_target | 100 | Query Tuning / Other Planner Options
189- from_collapse_limit | 8 | Query Tuning / Other Planner Options
190- join_collapse_limit | 8 | Query Tuning / Other Planner Options
191- cpu_index_tuple_cost | 0.005 | Query Tuning / Planner Cost Constants
192- cpu_operator_cost | 0.0025 | Query Tuning / Planner Cost Constants
193- cpu_tuple_cost | 0.01 | Query Tuning / Planner Cost Constants
194- effective_cache_size | 16384 | Query Tuning / Planner Cost Constants
195- random_page_cost | 4 | Query Tuning / Planner Cost Constants
196- seq_page_cost | 1 | Query Tuning / Planner Cost Constants
197- enable_bitmapscan | on | Query Tuning / Planner Method Configuration
198- enable_hashagg | on | Query Tuning / Planner Method Configuration
199- enable_hashjoin | on | Query Tuning / Planner Method Configuration
200- enable_indexscan | on | Query Tuning / Planner Method Configuration
201- enable_material | on | Query Tuning / Planner Method Configuration
202- enable_mergejoin | on | Query Tuning / Planner Method Configuration
203- enable_nestloop | on | Query Tuning / Planner Method Configuration
204- enable_seqscan | on | Query Tuning / Planner Method Configuration
205- enable_sort | on | Query Tuning / Planner Method Configuration
206- enable_tidscan | on | Query Tuning / Planner Method Configuration
207- client_min_messages | notice | Reporting and Logging / When to Log
208-(29 rows)
209-
--- a/expected/pg_hint_plan-9.1.out
+++ /dev/null
@@ -1,7942 +0,0 @@
1-SET search_path TO public;
2-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
3- QUERY PLAN
4---------------------------------------
5- Merge Join
6- Merge Cond: (t1.id = t2.id)
7- -> Index Scan using t1_pkey on t1
8- -> Index Scan using t2_pkey on t2
9-(4 rows)
10-
11-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
12- QUERY PLAN
13--------------------------------------------
14- Merge Join
15- Merge Cond: (t2.val = t1.val)
16- -> Index Scan using t2_val on t2
17- -> Materialize
18- -> Index Scan using t1_val on t1
19-(5 rows)
20-
21-LOAD 'pg_hint_plan';
22-SET pg_hint_plan.debug_print TO on;
23-SET client_min_messages TO LOG;
24-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
25- QUERY PLAN
26---------------------------------------
27- Merge Join
28- Merge Cond: (t1.id = t2.id)
29- -> Index Scan using t1_pkey on t1
30- -> Index Scan using t2_pkey on t2
31-(4 rows)
32-
33-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
34- QUERY PLAN
35--------------------------------------------
36- Merge Join
37- Merge Cond: (t2.val = t1.val)
38- -> Index Scan using t2_val on t2
39- -> Materialize
40- -> Index Scan using t1_val on t1
41-(5 rows)
42-
43-/*+ Test (t1 t2) */
44-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
45-INFO: hint syntax error at or near "Test (t1 t2) "
46-DETAIL: Unrecognized hint keyword "Test".
47- QUERY PLAN
48---------------------------------------
49- Merge Join
50- Merge Cond: (t1.id = t2.id)
51- -> Index Scan using t1_pkey on t1
52- -> Index Scan using t2_pkey on t2
53-(4 rows)
54-
55-SET pg_hint_plan.enable_hint TO off;
56-/*+ Test (t1 t2) */
57-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
58- QUERY PLAN
59---------------------------------------
60- Merge Join
61- Merge Cond: (t1.id = t2.id)
62- -> Index Scan using t1_pkey on t1
63- -> Index Scan using t2_pkey on t2
64-(4 rows)
65-
66-SET pg_hint_plan.enable_hint TO on;
67-/*Set(enable_indexscan off)*/
68-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
69- QUERY PLAN
70---------------------------------------
71- Merge Join
72- Merge Cond: (t1.id = t2.id)
73- -> Index Scan using t1_pkey on t1
74- -> Index Scan using t2_pkey on t2
75-(4 rows)
76-
77---+Set(enable_indexscan off)
78-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
79- QUERY PLAN
80---------------------------------------
81- Merge Join
82- Merge Cond: (t1.id = t2.id)
83- -> Index Scan using t1_pkey on t1
84- -> Index Scan using t2_pkey on t2
85-(4 rows)
86-
87-/*+Set(enable_indexscan off) /* nest comment */ */
88-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
89-INFO: hint syntax error at or near "/* nest comment */ */
90-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;"
91-DETAIL: Nested block comments are not supported.
92- QUERY PLAN
93---------------------------------------
94- Merge Join
95- Merge Cond: (t1.id = t2.id)
96- -> Index Scan using t1_pkey on t1
97- -> Index Scan using t2_pkey on t2
98-(4 rows)
99-
100-/*+Set(enable_indexscan off)*/
101-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
102-LOG: pg_hint_plan:
103-used hint:
104-Set(enable_indexscan off)
105-not used hint:
106-duplication hint:
107-error hint:
108-
109- QUERY PLAN
110-------------------------------
111- Hash Join
112- Hash Cond: (t1.id = t2.id)
113- -> Seq Scan on t1
114- -> Hash
115- -> Seq Scan on t2
116-(5 rows)
117-
118-EXPLAIN (COSTS false) /*+Set(enable_indexscan off)*/
119- SELECT * FROM t1, t2 WHERE t1.id = t2.id;
120-LOG: pg_hint_plan:
121-used hint:
122-Set(enable_indexscan off)
123-not used hint:
124-duplication hint:
125-error hint:
126-
127- QUERY PLAN
128-------------------------------
129- Hash Join
130- Hash Cond: (t1.id = t2.id)
131- -> Seq Scan on t1
132- -> Hash
133- -> Seq Scan on t2
134-(5 rows)
135-
136-/*+ Set(enable_indexscan off) Set(enable_hashjoin off) */
137-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
138-LOG: pg_hint_plan:
139-used hint:
140-Set(enable_hashjoin off)
141-Set(enable_indexscan off)
142-not used hint:
143-duplication hint:
144-error hint:
145-
146- QUERY PLAN
147--------------------------------
148- Merge Join
149- Merge Cond: (t1.id = t2.id)
150- -> Sort
151- Sort Key: t1.id
152- -> Seq Scan on t1
153- -> Sort
154- Sort Key: t2.id
155- -> Seq Scan on t2
156-(8 rows)
157-
158-/*+ Set ( enable_indexscan off ) */
159-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
160-LOG: pg_hint_plan:
161-used hint:
162-Set(enable_indexscan off)
163-not used hint:
164-duplication hint:
165-error hint:
166-
167- QUERY PLAN
168-------------------------------
169- Hash Join
170- Hash Cond: (t1.id = t2.id)
171- -> Seq Scan on t1
172- -> Hash
173- -> Seq Scan on t2
174-(5 rows)
175-
176-/*+
177- Set
178- (
179- enable_indexscan
180- off
181- )
182- */
183-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
184-LOG: pg_hint_plan:
185-used hint:
186-Set(enable_indexscan off)
187-not used hint:
188-duplication hint:
189-error hint:
190-
191- QUERY PLAN
192-------------------------------
193- Hash Join
194- Hash Cond: (t1.id = t2.id)
195- -> Seq Scan on t1
196- -> Hash
197- -> Seq Scan on t2
198-(5 rows)
199-
200-/*+ Set(enable_indexscan off)Set(enable_nestloop off)Set(enable_mergejoin off)
201- Set(enable_seqscan off)
202- */
203-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
204-LOG: pg_hint_plan:
205-used hint:
206-Set(enable_indexscan off)
207-Set(enable_mergejoin off)
208-Set(enable_nestloop off)
209-Set(enable_seqscan off)
210-not used hint:
211-duplication hint:
212-error hint:
213-
214- QUERY PLAN
215---------------------------------------------
216- Hash Join
217- Hash Cond: (t1.id = t2.id)
218- -> Index Scan using t1_pkey on t1
219- -> Hash
220- -> Index Scan using t2_pkey on t2
221-(5 rows)
222-
223-/*+Set(work_mem "1M")*/
224-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
225-INFO: invalid value for parameter "work_mem": "1M"
226-HINT: Valid units for this parameter are "kB", "MB", and "GB".
227-LOG: pg_hint_plan:
228-used hint:
229-not used hint:
230-duplication hint:
231-error hint:
232-Set(work_mem 1M)
233-
234- QUERY PLAN
235---------------------------------------
236- Merge Join
237- Merge Cond: (t1.id = t2.id)
238- -> Index Scan using t1_pkey on t1
239- -> Index Scan using t2_pkey on t2
240-(4 rows)
241-
242-/*+Set(work_mem "1MB")*/
243-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
244-LOG: pg_hint_plan:
245-used hint:
246-Set(work_mem 1MB)
247-not used hint:
248-duplication hint:
249-error hint:
250-
251- QUERY PLAN
252---------------------------------------
253- Merge Join
254- Merge Cond: (t1.id = t2.id)
255- -> Index Scan using t1_pkey on t1
256- -> Index Scan using t2_pkey on t2
257-(4 rows)
258-
259-/*+Set(work_mem TO "1MB")*/
260-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
261-INFO: hint syntax error at or near "Set(work_mem TO "1MB")"
262-DETAIL: Set hint requires name and value of GUC parameter.
263-LOG: pg_hint_plan:
264-used hint:
265-not used hint:
266-duplication hint:
267-error hint:
268-Set(work_mem TO 1MB)
269-
270- QUERY PLAN
271---------------------------------------
272- Merge Join
273- Merge Cond: (t1.id = t2.id)
274- -> Index Scan using t1_pkey on t1
275- -> Index Scan using t2_pkey on t2
276-(4 rows)
277-
278-/*+SeqScan(t1 t2)*/
279-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
280-INFO: hint syntax error at or near ""
281-DETAIL: SeqScan hint accepts only one relation.
282-LOG: pg_hint_plan:
283-used hint:
284-not used hint:
285-duplication hint:
286-error hint:
287-SeqScan(t1 t2)
288-
289- QUERY PLAN
290---------------------------------------
291- Merge Join
292- Merge Cond: (t1.id = t2.id)
293- -> Index Scan using t1_pkey on t1
294- -> Index Scan using t2_pkey on t2
295-(4 rows)
296-
297-/*+SeqScan(t1)*/
298-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
299-LOG: pg_hint_plan:
300-used hint:
301-SeqScan(t1)
302-not used hint:
303-duplication hint:
304-error hint:
305-
306- QUERY PLAN
307-------------------------------
308- Hash Join
309- Hash Cond: (t1.id = t2.id)
310- -> Seq Scan on t1
311- -> Hash
312- -> Seq Scan on t2
313-(5 rows)
314-
315-/*+SeqScan(t1)IndexScan(t2)*/
316-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
317-LOG: pg_hint_plan:
318-used hint:
319-SeqScan(t1)
320-IndexScan(t2)
321-not used hint:
322-duplication hint:
323-error hint:
324-
325- QUERY PLAN
326---------------------------------------------
327- Hash Join
328- Hash Cond: (t1.id = t2.id)
329- -> Seq Scan on t1
330- -> Hash
331- -> Index Scan using t2_pkey on t2
332-(5 rows)
333-
334-/*+BitmapScan(t2)*/
335-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
336-LOG: pg_hint_plan:
337-used hint:
338-BitmapScan(t2)
339-not used hint:
340-duplication hint:
341-error hint:
342-
343- QUERY PLAN
344-------------------------------------------
345- Nested Loop
346- -> Seq Scan on t1
347- -> Bitmap Heap Scan on t2
348- Recheck Cond: (id = t1.id)
349- -> Bitmap Index Scan on t2_pkey
350- Index Cond: (id = t1.id)
351-(6 rows)
352-
353-/*+BitmapScan(t2)NoSeqScan(t1)*/
354-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
355-LOG: pg_hint_plan:
356-used hint:
357-NoSeqScan(t1)
358-BitmapScan(t2)
359-not used hint:
360-duplication hint:
361-error hint:
362-
363- QUERY PLAN
364-------------------------------------------
365- Nested Loop
366- -> Index Scan using t1_pkey on t1
367- -> Bitmap Heap Scan on t2
368- Recheck Cond: (id = t1.id)
369- -> Bitmap Index Scan on t2_pkey
370- Index Cond: (id = t1.id)
371-(6 rows)
372-
373-/*+NoIndexScan(t1)*/
374-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
375-LOG: pg_hint_plan:
376-used hint:
377-NoIndexScan(t1)
378-not used hint:
379-duplication hint:
380-error hint:
381-
382- QUERY PLAN
383-------------------------------
384- Hash Join
385- Hash Cond: (t1.id = t2.id)
386- -> Seq Scan on t1
387- -> Hash
388- -> Seq Scan on t2
389-(5 rows)
390-
391-/*+NoBitmapScan(t1)*/
392-EXPLAIN (COSTS false) SELECT * FROM t1, t4 WHERE t1.val < 10;
393-LOG: pg_hint_plan:
394-used hint:
395-NoBitmapScan(t1)
396-not used hint:
397-duplication hint:
398-error hint:
399-
400- QUERY PLAN
401-----------------------------
402- Nested Loop
403- -> Seq Scan on t1
404- Filter: (val < 10)
405- -> Materialize
406- -> Seq Scan on t4
407-(5 rows)
408-
409-/*+TidScan(t4)*/
410-EXPLAIN (COSTS false) SELECT * FROM t3, t4 WHERE t3.id = t4.id AND t4.ctid = '(1,1)';
411-LOG: pg_hint_plan:
412-used hint:
413-TidScan(t4)
414-not used hint:
415-duplication hint:
416-error hint:
417-
418- QUERY PLAN
419------------------------------------------------
420- Merge Join
421- Merge Cond: (t3.id = t4.id)
422- -> Index Scan using t3_pkey on t3
423- -> Sort
424- Sort Key: t4.id
425- -> Tid Scan on t4
426- TID Cond: (ctid = '(1,1)'::tid)
427-(7 rows)
428-
429-/*+NoTidScan(t1)*/
430-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)';
431-LOG: pg_hint_plan:
432-used hint:
433-NoTidScan(t1)
434-not used hint:
435-duplication hint:
436-error hint:
437-
438- QUERY PLAN
439----------------------------------------
440- Nested Loop
441- -> Seq Scan on t1
442- Filter: (ctid = '(1,1)'::tid)
443- -> Index Scan using t2_pkey on t2
444- Index Cond: (id = t1.id)
445-(5 rows)
446-
447-/*+HashJoin(t1 t2)*/
448-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
449-LOG: pg_hint_plan:
450-used hint:
451-HashJoin(t1 t2)
452-not used hint:
453-duplication hint:
454-error hint:
455-
456- QUERY PLAN
457-------------------------------
458- Hash Join
459- Hash Cond: (t1.id = t2.id)
460- -> Seq Scan on t1
461- -> Hash
462- -> Seq Scan on t2
463-(5 rows)
464-
465-/*+NestLoop(t1 t2)*/
466-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
467-LOG: pg_hint_plan:
468-used hint:
469-NestLoop(t1 t2)
470-not used hint:
471-duplication hint:
472-error hint:
473-
474- QUERY PLAN
475---------------------------------------
476- Nested Loop
477- -> Seq Scan on t2
478- -> Index Scan using t1_pkey on t1
479- Index Cond: (id = t2.id)
480-(4 rows)
481-
482-/*+NoMergeJoin(t1 t2)*/
483-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
484-LOG: pg_hint_plan:
485-used hint:
486-NoMergeJoin(t1 t2)
487-not used hint:
488-duplication hint:
489-error hint:
490-
491- QUERY PLAN
492-------------------------------
493- Hash Join
494- Hash Cond: (t1.id = t2.id)
495- -> Seq Scan on t1
496- -> Hash
497- -> Seq Scan on t2
498-(5 rows)
499-
500-/*+MergeJoin(t1 t3)*/
501-EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
502-LOG: pg_hint_plan:
503-used hint:
504-MergeJoin(t1 t3)
505-not used hint:
506-duplication hint:
507-error hint:
508-
509- QUERY PLAN
510--------------------------------------
511- Merge Join
512- Merge Cond: (t1.val = t3.val)
513- -> Index Scan using t1_val on t1
514- -> Sort
515- Sort Key: t3.val
516- -> Seq Scan on t3
517-(6 rows)
518-
519-/*+NestLoop(t1 t3)*/
520-EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
521-LOG: pg_hint_plan:
522-used hint:
523-NestLoop(t1 t3)
524-not used hint:
525-duplication hint:
526-error hint:
527-
528- QUERY PLAN
529--------------------------------------
530- Nested Loop
531- -> Seq Scan on t3
532- -> Index Scan using t1_val on t1
533- Index Cond: (val = t3.val)
534-(4 rows)
535-
536-/*+NoHashJoin(t1 t3)*/
537-EXPLAIN (COSTS false) SELECT * FROM t1, t3 WHERE t1.val = t3.val;
538-LOG: pg_hint_plan:
539-used hint:
540-NoHashJoin(t1 t3)
541-not used hint:
542-duplication hint:
543-error hint:
544-
545- QUERY PLAN
546--------------------------------------
547- Nested Loop
548- -> Seq Scan on t3
549- -> Index Scan using t1_val on t1
550- Index Cond: (val = t3.val)
551-(4 rows)
552-
553-/*+MergeJoin(t4 t1 t2 t3)*/
554-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
555-LOG: pg_hint_plan:
556-used hint:
557-MergeJoin(t1 t2 t3 t4)
558-not used hint:
559-duplication hint:
560-error hint:
561-
562- QUERY PLAN
563---------------------------------------------------
564- Merge Join
565- Merge Cond: (t1.id = t4.id)
566- -> Merge Join
567- Merge Cond: (t1.id = t3.id)
568- -> Merge Join
569- Merge Cond: (t1.id = t2.id)
570- -> Index Scan using t1_pkey on t1
571- -> Index Scan using t2_pkey on t2
572- -> Index Scan using t3_pkey on t3
573- -> Sort
574- Sort Key: t4.id
575- -> Seq Scan on t4
576-(12 rows)
577-
578-/*+HashJoin(t3 t4 t1 t2)*/
579-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
580-LOG: pg_hint_plan:
581-used hint:
582-HashJoin(t1 t2 t3 t4)
583-not used hint:
584-duplication hint:
585-error hint:
586-
587- QUERY PLAN
588---------------------------------------------------------
589- Hash Join
590- Hash Cond: (t3.id = t1.id)
591- -> Seq Scan on t3
592- -> Hash
593- -> Merge Join
594- Merge Cond: (t1.id = t4.id)
595- -> Merge Join
596- Merge Cond: (t1.id = t2.id)
597- -> Index Scan using t1_pkey on t1
598- -> Index Scan using t2_pkey on t2
599- -> Sort
600- Sort Key: t4.id
601- -> Seq Scan on t4
602-(13 rows)
603-
604-/*+NestLoop(t2 t3 t4 t1) IndexScan(t3)*/
605-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
606-LOG: pg_hint_plan:
607-used hint:
608-IndexScan(t3)
609-NestLoop(t1 t2 t3 t4)
610-not used hint:
611-duplication hint:
612-error hint:
613-
614- QUERY PLAN
615---------------------------------------------------
616- Nested Loop
617- -> Merge Join
618- Merge Cond: (t1.id = t4.id)
619- -> Merge Join
620- Merge Cond: (t1.id = t2.id)
621- -> Index Scan using t1_pkey on t1
622- -> Index Scan using t2_pkey on t2
623- -> Sort
624- Sort Key: t4.id
625- -> Seq Scan on t4
626- -> Index Scan using t3_pkey on t3
627- Index Cond: (id = t1.id)
628-(12 rows)
629-
630-/*+NoNestLoop(t4 t1 t3 t2)*/
631-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
632-LOG: pg_hint_plan:
633-used hint:
634-NoNestLoop(t1 t2 t3 t4)
635-not used hint:
636-duplication hint:
637-error hint:
638-
639- QUERY PLAN
640---------------------------------------------------
641- Merge Join
642- Merge Cond: (t1.id = t4.id)
643- -> Merge Join
644- Merge Cond: (t1.id = t3.id)
645- -> Merge Join
646- Merge Cond: (t1.id = t2.id)
647- -> Index Scan using t1_pkey on t1
648- -> Index Scan using t2_pkey on t2
649- -> Index Scan using t3_pkey on t3
650- -> Sort
651- Sort Key: t4.id
652- -> Seq Scan on t4
653-(12 rows)
654-
655-/*+Leading( */
656-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
657-INFO: hint syntax error at or near ""
658-DETAIL: Closing parenthesis is necessary.
659- QUERY PLAN
660---------------------------------------------------
661- Merge Join
662- Merge Cond: (t1.id = t4.id)
663- -> Merge Join
664- Merge Cond: (t1.id = t3.id)
665- -> Merge Join
666- Merge Cond: (t1.id = t2.id)
667- -> Index Scan using t1_pkey on t1
668- -> Index Scan using t2_pkey on t2
669- -> Index Scan using t3_pkey on t3
670- -> Sort
671- Sort Key: t4.id
672- -> Seq Scan on t4
673-(12 rows)
674-
675-/*+Leading( )*/
676-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
677-INFO: hint syntax error at or near "Leading( )"
678-DETAIL: Leading hint requires at least two relations.
679-LOG: pg_hint_plan:
680-used hint:
681-not used hint:
682-duplication hint:
683-error hint:
684-Leading()
685-
686- QUERY PLAN
687---------------------------------------------------
688- Merge Join
689- Merge Cond: (t1.id = t4.id)
690- -> Merge Join
691- Merge Cond: (t1.id = t3.id)
692- -> Merge Join
693- Merge Cond: (t1.id = t2.id)
694- -> Index Scan using t1_pkey on t1
695- -> Index Scan using t2_pkey on t2
696- -> Index Scan using t3_pkey on t3
697- -> Sort
698- Sort Key: t4.id
699- -> Seq Scan on t4
700-(12 rows)
701-
702-/*+Leading( t3 )*/
703-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
704-INFO: hint syntax error at or near "Leading( t3 )"
705-DETAIL: Leading hint requires at least two relations.
706-LOG: pg_hint_plan:
707-used hint:
708-not used hint:
709-duplication hint:
710-error hint:
711-Leading(t3)
712-
713- QUERY PLAN
714---------------------------------------------------
715- Merge Join
716- Merge Cond: (t1.id = t4.id)
717- -> Merge Join
718- Merge Cond: (t1.id = t3.id)
719- -> Merge Join
720- Merge Cond: (t1.id = t2.id)
721- -> Index Scan using t1_pkey on t1
722- -> Index Scan using t2_pkey on t2
723- -> Index Scan using t3_pkey on t3
724- -> Sort
725- Sort Key: t4.id
726- -> Seq Scan on t4
727-(12 rows)
728-
729-/*+Leading( t3 t4 )*/
730-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
731-LOG: pg_hint_plan:
732-used hint:
733-Leading(t3 t4)
734-not used hint:
735-duplication hint:
736-error hint:
737-
738- QUERY PLAN
739---------------------------------------------------
740- Nested Loop
741- -> Nested Loop
742- -> Merge Join
743- Merge Cond: (t3.id = t4.id)
744- -> Index Scan using t3_pkey on t3
745- -> Sort
746- Sort Key: t4.id
747- -> Seq Scan on t4
748- -> Index Scan using t2_pkey on t2
749- Index Cond: (id = t3.id)
750- -> Index Scan using t1_pkey on t1
751- Index Cond: (id = t2.id)
752-(12 rows)
753-
754-/*+Leading(t3 t4 t1)*/
755-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
756-LOG: pg_hint_plan:
757-used hint:
758-Leading(t3 t4 t1)
759-not used hint:
760-duplication hint:
761-error hint:
762-
763- QUERY PLAN
764---------------------------------------------------
765- Nested Loop
766- -> Merge Join
767- Merge Cond: (t3.id = t1.id)
768- -> Merge Join
769- Merge Cond: (t3.id = t4.id)
770- -> Index Scan using t3_pkey on t3
771- -> Sort
772- Sort Key: t4.id
773- -> Seq Scan on t4
774- -> Index Scan using t1_pkey on t1
775- -> Index Scan using t2_pkey on t2
776- Index Cond: (id = t1.id)
777-(12 rows)
778-
779-/*+Leading(t3 t4 t1 t2)*/
780-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
781-LOG: pg_hint_plan:
782-used hint:
783-Leading(t3 t4 t1 t2)
784-not used hint:
785-duplication hint:
786-error hint:
787-
788- QUERY PLAN
789---------------------------------------------------
790- Nested Loop
791- -> Merge Join
792- Merge Cond: (t3.id = t1.id)
793- -> Merge Join
794- Merge Cond: (t3.id = t4.id)
795- -> Index Scan using t3_pkey on t3
796- -> Sort
797- Sort Key: t4.id
798- -> Seq Scan on t4
799- -> Index Scan using t1_pkey on t1
800- -> Index Scan using t2_pkey on t2
801- Index Cond: (id = t1.id)
802-(12 rows)
803-
804-/*+Leading(t3 t4 t1 t2 t1)*/
805-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
806-INFO: hint syntax error at or near "Leading(t3 t4 t1 t2 t1)"
807-DETAIL: Relation name "t1" is duplicated.
808-LOG: pg_hint_plan:
809-used hint:
810-not used hint:
811-duplication hint:
812-error hint:
813-Leading(t3 t4 t1 t2 t1)
814-
815- QUERY PLAN
816---------------------------------------------------
817- Merge Join
818- Merge Cond: (t1.id = t4.id)
819- -> Merge Join
820- Merge Cond: (t1.id = t3.id)
821- -> Merge Join
822- Merge Cond: (t1.id = t2.id)
823- -> Index Scan using t1_pkey on t1
824- -> Index Scan using t2_pkey on t2
825- -> Index Scan using t3_pkey on t3
826- -> Sort
827- Sort Key: t4.id
828- -> Seq Scan on t4
829-(12 rows)
830-
831-/*+Leading(t3 t4 t4)*/
832-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id;
833-INFO: hint syntax error at or near "Leading(t3 t4 t4)"
834-DETAIL: Relation name "t4" is duplicated.
835-LOG: pg_hint_plan:
836-used hint:
837-not used hint:
838-duplication hint:
839-error hint:
840-Leading(t3 t4 t4)
841-
842- QUERY PLAN
843---------------------------------------------------
844- Merge Join
845- Merge Cond: (t1.id = t4.id)
846- -> Merge Join
847- Merge Cond: (t1.id = t3.id)
848- -> Merge Join
849- Merge Cond: (t1.id = t2.id)
850- -> Index Scan using t1_pkey on t1
851- -> Index Scan using t2_pkey on t2
852- -> Index Scan using t3_pkey on t3
853- -> Sort
854- Sort Key: t4.id
855- -> Seq Scan on t4
856-(12 rows)
857-
858-EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
859- QUERY PLAN
860------------------------------------------------
861- Nested Loop
862- -> Values Scan on "*VALUES*"
863- -> Index Scan using t1_pkey on t1
864- Index Cond: (id = "*VALUES*".column1)
865-(4 rows)
866-
867-/*+HashJoin(t1 t2)*/
868-EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
869-LOG: pg_hint_plan:
870-used hint:
871-not used hint:
872-HashJoin(t1 t2)
873-duplication hint:
874-error hint:
875-
876- QUERY PLAN
877------------------------------------------------
878- Nested Loop
879- -> Values Scan on "*VALUES*"
880- -> Index Scan using t1_pkey on t1
881- Index Cond: (id = "*VALUES*".column1)
882-(4 rows)
883-
884-/*+HashJoin(t1 *VALUES*)*/
885-EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
886-LOG: pg_hint_plan:
887-used hint:
888-HashJoin(*VALUES* t1)
889-not used hint:
890-duplication hint:
891-error hint:
892-
893- QUERY PLAN
894--------------------------------------------
895- Hash Join
896- Hash Cond: (t1.id = "*VALUES*".column1)
897- -> Seq Scan on t1
898- -> Hash
899- -> Values Scan on "*VALUES*"
900-(5 rows)
901-
902-/*+HashJoin(t1 *VALUES*) IndexScan(t1) IndexScan(*VALUES*)*/
903-EXPLAIN (COSTS false) SELECT * FROM t1, (VALUES(1,1),(2,2),(3,3)) AS t2(id,val) WHERE t1.id = t2.id;
904-LOG: pg_hint_plan:
905-used hint:
906-IndexScan(t1)
907-HashJoin(*VALUES* t1)
908-not used hint:
909-IndexScan(*VALUES*)
910-duplication hint:
911-error hint:
912-
913- QUERY PLAN
914--------------------------------------------
915- Hash Join
916- Hash Cond: (t1.id = "*VALUES*".column1)
917- -> Index Scan using t1_pkey on t1
918- -> Hash
919- -> Values Scan on "*VALUES*"
920-(5 rows)
921-
922--- single table scan hint test
923-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
924- QUERY PLAN
925-----------------------------------------------------------------------
926- Index Scan using t1_pkey on t1
927- Index Cond: (id = $3)
928- InitPlan 2 (returns $1)
929- -> Result
930- InitPlan 1 (returns $0)
931- -> Limit
932- -> Index Scan Backward using t1_pkey on t1 v_1
933- Index Cond: ((id IS NOT NULL) AND (id < 10))
934- InitPlan 4 (returns $3)
935- -> Result
936- InitPlan 3 (returns $2)
937- -> Limit
938- -> Index Scan Backward using t1_pkey on t1 v_2
939- Index Cond: ((id IS NOT NULL) AND (id < 10))
940-(14 rows)
941-
942-/*+BitmapScan(v_1)*/
943-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
944-LOG: pg_hint_plan:
945-used hint:
946-BitmapScan(v_1)
947-not used hint:
948-duplication hint:
949-error hint:
950-
951- QUERY PLAN
952-----------------------------------------------------------------------
953- Index Scan using t1_pkey on t1
954- Index Cond: (id = $2)
955- InitPlan 1 (returns $0)
956- -> Aggregate
957- -> Bitmap Heap Scan on t1 v_1
958- Recheck Cond: (id < 10)
959- -> Bitmap Index Scan on t1_pkey
960- Index Cond: (id < 10)
961- InitPlan 3 (returns $2)
962- -> Result
963- InitPlan 2 (returns $1)
964- -> Limit
965- -> Index Scan Backward using t1_pkey on t1 v_2
966- Index Cond: ((id IS NOT NULL) AND (id < 10))
967-(14 rows)
968-
969-/*+BitmapScan(v_2)*/
970-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
971-LOG: pg_hint_plan:
972-used hint:
973-BitmapScan(v_2)
974-not used hint:
975-duplication hint:
976-error hint:
977-
978- QUERY PLAN
979-----------------------------------------------------------------------
980- Index Scan using t1_pkey on t1
981- Index Cond: (id = $2)
982- InitPlan 2 (returns $1)
983- -> Result
984- InitPlan 1 (returns $0)
985- -> Limit
986- -> Index Scan Backward using t1_pkey on t1 v_1
987- Index Cond: ((id IS NOT NULL) AND (id < 10))
988- InitPlan 3 (returns $2)
989- -> Aggregate
990- -> Bitmap Heap Scan on t1 v_2
991- Recheck Cond: (id < 10)
992- -> Bitmap Index Scan on t1_pkey
993- Index Cond: (id < 10)
994-(14 rows)
995-
996-/*+BitmapScan(t1)*/
997-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
998-LOG: pg_hint_plan:
999-used hint:
1000-BitmapScan(t1)
1001-not used hint:
1002-duplication hint:
1003-error hint:
1004-
1005- QUERY PLAN
1006-----------------------------------------------------------------------
1007- Bitmap Heap Scan on t1
1008- Recheck Cond: (id = $3)
1009- InitPlan 2 (returns $1)
1010- -> Result
1011- InitPlan 1 (returns $0)
1012- -> Limit
1013- -> Index Scan Backward using t1_pkey on t1 v_1
1014- Index Cond: ((id IS NOT NULL) AND (id < 10))
1015- InitPlan 4 (returns $3)
1016- -> Result
1017- InitPlan 3 (returns $2)
1018- -> Limit
1019- -> Index Scan Backward using t1_pkey on t1 v_2
1020- Index Cond: ((id IS NOT NULL) AND (id < 10))
1021- -> Bitmap Index Scan on t1_pkey
1022- Index Cond: (id = $3)
1023-(16 rows)
1024-
1025-/*+BitmapScan(v_1)BitmapScan(v_2)*/
1026-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1027-LOG: pg_hint_plan:
1028-used hint:
1029-BitmapScan(v_1)
1030-BitmapScan(v_2)
1031-not used hint:
1032-duplication hint:
1033-error hint:
1034-
1035- QUERY PLAN
1036---------------------------------------------------
1037- Index Scan using t1_pkey on t1
1038- Index Cond: (id = $1)
1039- InitPlan 1 (returns $0)
1040- -> Aggregate
1041- -> Bitmap Heap Scan on t1 v_1
1042- Recheck Cond: (id < 10)
1043- -> Bitmap Index Scan on t1_pkey
1044- Index Cond: (id < 10)
1045- InitPlan 2 (returns $1)
1046- -> Aggregate
1047- -> Bitmap Heap Scan on t1 v_2
1048- Recheck Cond: (id < 10)
1049- -> Bitmap Index Scan on t1_pkey
1050- Index Cond: (id < 10)
1051-(14 rows)
1052-
1053-/*+BitmapScan(v_1)BitmapScan(t1)*/
1054-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1055-LOG: pg_hint_plan:
1056-used hint:
1057-BitmapScan(t1)
1058-BitmapScan(v_1)
1059-not used hint:
1060-duplication hint:
1061-error hint:
1062-
1063- QUERY PLAN
1064-----------------------------------------------------------------------
1065- Bitmap Heap Scan on t1
1066- Recheck Cond: (id = $2)
1067- InitPlan 1 (returns $0)
1068- -> Aggregate
1069- -> Bitmap Heap Scan on t1 v_1
1070- Recheck Cond: (id < 10)
1071- -> Bitmap Index Scan on t1_pkey
1072- Index Cond: (id < 10)
1073- InitPlan 3 (returns $2)
1074- -> Result
1075- InitPlan 2 (returns $1)
1076- -> Limit
1077- -> Index Scan Backward using t1_pkey on t1 v_2
1078- Index Cond: ((id IS NOT NULL) AND (id < 10))
1079- -> Bitmap Index Scan on t1_pkey
1080- Index Cond: (id = $2)
1081-(16 rows)
1082-
1083-/*+BitmapScan(v_2)BitmapScan(t1)*/
1084-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1085-LOG: pg_hint_plan:
1086-used hint:
1087-BitmapScan(t1)
1088-BitmapScan(v_2)
1089-not used hint:
1090-duplication hint:
1091-error hint:
1092-
1093- QUERY PLAN
1094-----------------------------------------------------------------------
1095- Bitmap Heap Scan on t1
1096- Recheck Cond: (id = $2)
1097- InitPlan 2 (returns $1)
1098- -> Result
1099- InitPlan 1 (returns $0)
1100- -> Limit
1101- -> Index Scan Backward using t1_pkey on t1 v_1
1102- Index Cond: ((id IS NOT NULL) AND (id < 10))
1103- InitPlan 3 (returns $2)
1104- -> Aggregate
1105- -> Bitmap Heap Scan on t1 v_2
1106- Recheck Cond: (id < 10)
1107- -> Bitmap Index Scan on t1_pkey
1108- Index Cond: (id < 10)
1109- -> Bitmap Index Scan on t1_pkey
1110- Index Cond: (id = $2)
1111-(16 rows)
1112-
1113-/*+BitmapScan(v_1)BitmapScan(v_2)BitmapScan(t1)*/
1114-EXPLAIN (COSTS false) SELECT (SELECT max(id) FROM t1 v_1 WHERE id < 10), id FROM v1 WHERE v1.id = (SELECT max(id) FROM t1 v_2 WHERE id < 10);
1115-LOG: pg_hint_plan:
1116-used hint:
1117-BitmapScan(t1)
1118-BitmapScan(v_1)
1119-BitmapScan(v_2)
1120-not used hint:
1121-duplication hint:
1122-error hint:
1123-
1124- QUERY PLAN
1125---------------------------------------------------
1126- Bitmap Heap Scan on t1
1127- Recheck Cond: (id = $1)
1128- InitPlan 1 (returns $0)
1129- -> Aggregate
1130- -> Bitmap Heap Scan on t1 v_1
1131- Recheck Cond: (id < 10)
1132- -> Bitmap Index Scan on t1_pkey
1133- Index Cond: (id < 10)
1134- InitPlan 2 (returns $1)
1135- -> Aggregate
1136- -> Bitmap Heap Scan on t1 v_2
1137- Recheck Cond: (id < 10)
1138- -> Bitmap Index Scan on t1_pkey
1139- Index Cond: (id < 10)
1140- -> Bitmap Index Scan on t1_pkey
1141- Index Cond: (id = $1)
1142-(16 rows)
1143-
1144--- full scan hint pattern test
1145-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1146- QUERY PLAN
1147------------------------------------
1148- Tid Scan on t1
1149- TID Cond: (ctid = '(1,1)'::tid)
1150- Filter: (id < 10)
1151-(3 rows)
1152-
1153-/*+SeqScan(t1)*/
1154-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1155-LOG: pg_hint_plan:
1156-used hint:
1157-SeqScan(t1)
1158-not used hint:
1159-duplication hint:
1160-error hint:
1161-
1162- QUERY PLAN
1163--------------------------------------------------
1164- Seq Scan on t1
1165- Filter: ((id < 10) AND (ctid = '(1,1)'::tid))
1166-(2 rows)
1167-
1168-/*+IndexScan(t1)*/
1169-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1170-LOG: pg_hint_plan:
1171-used hint:
1172-IndexScan(t1)
1173-not used hint:
1174-duplication hint:
1175-error hint:
1176-
1177- QUERY PLAN
1178----------------------------------
1179- Index Scan using t1_pkey on t1
1180- Index Cond: (id < 10)
1181- Filter: (ctid = '(1,1)'::tid)
1182-(3 rows)
1183-
1184-/*+BitmapScan(t1)*/
1185-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1186-LOG: pg_hint_plan:
1187-used hint:
1188-BitmapScan(t1)
1189-not used hint:
1190-duplication hint:
1191-error hint:
1192-
1193- QUERY PLAN
1194-------------------------------------
1195- Bitmap Heap Scan on t1
1196- Recheck Cond: (id < 10)
1197- Filter: (ctid = '(1,1)'::tid)
1198- -> Bitmap Index Scan on t1_pkey
1199- Index Cond: (id < 10)
1200-(5 rows)
1201-
1202-/*+TidScan(t1)*/
1203-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1204-LOG: pg_hint_plan:
1205-used hint:
1206-TidScan(t1)
1207-not used hint:
1208-duplication hint:
1209-error hint:
1210-
1211- QUERY PLAN
1212------------------------------------
1213- Tid Scan on t1
1214- TID Cond: (ctid = '(1,1)'::tid)
1215- Filter: (id < 10)
1216-(3 rows)
1217-
1218-/*+NoSeqScan(t1)*/
1219-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1220-LOG: pg_hint_plan:
1221-used hint:
1222-NoSeqScan(t1)
1223-not used hint:
1224-duplication hint:
1225-error hint:
1226-
1227- QUERY PLAN
1228------------------------------------
1229- Tid Scan on t1
1230- TID Cond: (ctid = '(1,1)'::tid)
1231- Filter: (id < 10)
1232-(3 rows)
1233-
1234-/*+NoIndexScan(t1)*/
1235-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1236-LOG: pg_hint_plan:
1237-used hint:
1238-NoIndexScan(t1)
1239-not used hint:
1240-duplication hint:
1241-error hint:
1242-
1243- QUERY PLAN
1244------------------------------------
1245- Tid Scan on t1
1246- TID Cond: (ctid = '(1,1)'::tid)
1247- Filter: (id < 10)
1248-(3 rows)
1249-
1250-/*+NoBitmapScan(t1)*/
1251-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1252-LOG: pg_hint_plan:
1253-used hint:
1254-NoBitmapScan(t1)
1255-not used hint:
1256-duplication hint:
1257-error hint:
1258-
1259- QUERY PLAN
1260------------------------------------
1261- Tid Scan on t1
1262- TID Cond: (ctid = '(1,1)'::tid)
1263- Filter: (id < 10)
1264-(3 rows)
1265-
1266-/*+NoTidScan(t1)*/
1267-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE id < 10 AND ctid = '(1,1)';
1268-LOG: pg_hint_plan:
1269-used hint:
1270-NoTidScan(t1)
1271-not used hint:
1272-duplication hint:
1273-error hint:
1274-
1275- QUERY PLAN
1276----------------------------------
1277- Index Scan using t1_pkey on t1
1278- Index Cond: (id < 10)
1279- Filter: (ctid = '(1,1)'::tid)
1280-(3 rows)
1281-
1282-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1283- QUERY PLAN
1284------------------------------------------
1285- Nested Loop
1286- Join Filter: (t1.id = t2.id)
1287- -> Tid Scan on t1
1288- TID Cond: (ctid = '(1,1)'::tid)
1289- -> Tid Scan on t2
1290- TID Cond: (ctid = '(1,1)'::tid)
1291-(6 rows)
1292-
1293-/*+SeqScan(t1)*/
1294-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1295-LOG: pg_hint_plan:
1296-used hint:
1297-SeqScan(t1)
1298-not used hint:
1299-duplication hint:
1300-error hint:
1301-
1302- QUERY PLAN
1303------------------------------------------
1304- Nested Loop
1305- Join Filter: (t1.id = t2.id)
1306- -> Seq Scan on t1
1307- Filter: (ctid = '(1,1)'::tid)
1308- -> Tid Scan on t2
1309- TID Cond: (ctid = '(1,1)'::tid)
1310-(6 rows)
1311-
1312-/*+SeqScan(t2)*/
1313-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1314-LOG: pg_hint_plan:
1315-used hint:
1316-SeqScan(t2)
1317-not used hint:
1318-duplication hint:
1319-error hint:
1320-
1321- QUERY PLAN
1322------------------------------------------
1323- Nested Loop
1324- Join Filter: (t1.id = t2.id)
1325- -> Tid Scan on t1
1326- TID Cond: (ctid = '(1,1)'::tid)
1327- -> Seq Scan on t2
1328- Filter: (ctid = '(1,1)'::tid)
1329-(6 rows)
1330-
1331-/*+SeqScan(t1) SeqScan(t2)*/
1332-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1333-LOG: pg_hint_plan:
1334-used hint:
1335-SeqScan(t1)
1336-SeqScan(t2)
1337-not used hint:
1338-duplication hint:
1339-error hint:
1340-
1341- QUERY PLAN
1342----------------------------------------
1343- Nested Loop
1344- Join Filter: (t1.id = t2.id)
1345- -> Seq Scan on t1
1346- Filter: (ctid = '(1,1)'::tid)
1347- -> Seq Scan on t2
1348- Filter: (ctid = '(1,1)'::tid)
1349-(6 rows)
1350-
1351-/*+SeqScan(t1) IndexScan(t2)*/
1352-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1353-LOG: pg_hint_plan:
1354-used hint:
1355-SeqScan(t1)
1356-IndexScan(t2)
1357-not used hint:
1358-duplication hint:
1359-error hint:
1360-
1361- QUERY PLAN
1362----------------------------------------
1363- Nested Loop
1364- -> Seq Scan on t1
1365- Filter: (ctid = '(1,1)'::tid)
1366- -> Index Scan using t2_pkey on t2
1367- Index Cond: (id = t1.id)
1368- Filter: (ctid = '(1,1)'::tid)
1369-(6 rows)
1370-
1371-/*+SeqScan(t1) BitmapScan(t2)*/
1372-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1373-LOG: pg_hint_plan:
1374-used hint:
1375-SeqScan(t1)
1376-BitmapScan(t2)
1377-not used hint:
1378-duplication hint:
1379-error hint:
1380-
1381- QUERY PLAN
1382-------------------------------------------
1383- Nested Loop
1384- -> Seq Scan on t1
1385- Filter: (ctid = '(1,1)'::tid)
1386- -> Bitmap Heap Scan on t2
1387- Recheck Cond: (id = t1.id)
1388- Filter: (ctid = '(1,1)'::tid)
1389- -> Bitmap Index Scan on t2_pkey
1390- Index Cond: (id = t1.id)
1391-(8 rows)
1392-
1393-/*+SeqScan(t1) TidScan(t2)*/
1394-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1395-LOG: pg_hint_plan:
1396-used hint:
1397-SeqScan(t1)
1398-TidScan(t2)
1399-not used hint:
1400-duplication hint:
1401-error hint:
1402-
1403- QUERY PLAN
1404------------------------------------------
1405- Nested Loop
1406- Join Filter: (t1.id = t2.id)
1407- -> Seq Scan on t1
1408- Filter: (ctid = '(1,1)'::tid)
1409- -> Tid Scan on t2
1410- TID Cond: (ctid = '(1,1)'::tid)
1411-(6 rows)
1412-
1413-/*+SeqScan(t1) NoSeqScan(t2)*/
1414-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1415-LOG: pg_hint_plan:
1416-used hint:
1417-SeqScan(t1)
1418-NoSeqScan(t2)
1419-not used hint:
1420-duplication hint:
1421-error hint:
1422-
1423- QUERY PLAN
1424------------------------------------------
1425- Nested Loop
1426- Join Filter: (t1.id = t2.id)
1427- -> Seq Scan on t1
1428- Filter: (ctid = '(1,1)'::tid)
1429- -> Tid Scan on t2
1430- TID Cond: (ctid = '(1,1)'::tid)
1431-(6 rows)
1432-
1433-/*+SeqScan(t1) NoIndexScan(t2)*/
1434-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1435-LOG: pg_hint_plan:
1436-used hint:
1437-SeqScan(t1)
1438-NoIndexScan(t2)
1439-not used hint:
1440-duplication hint:
1441-error hint:
1442-
1443- QUERY PLAN
1444------------------------------------------
1445- Nested Loop
1446- Join Filter: (t1.id = t2.id)
1447- -> Seq Scan on t1
1448- Filter: (ctid = '(1,1)'::tid)
1449- -> Tid Scan on t2
1450- TID Cond: (ctid = '(1,1)'::tid)
1451-(6 rows)
1452-
1453-/*+SeqScan(t1) NoBitmapScan(t2)*/
1454-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1455-LOG: pg_hint_plan:
1456-used hint:
1457-SeqScan(t1)
1458-NoBitmapScan(t2)
1459-not used hint:
1460-duplication hint:
1461-error hint:
1462-
1463- QUERY PLAN
1464------------------------------------------
1465- Nested Loop
1466- Join Filter: (t1.id = t2.id)
1467- -> Seq Scan on t1
1468- Filter: (ctid = '(1,1)'::tid)
1469- -> Tid Scan on t2
1470- TID Cond: (ctid = '(1,1)'::tid)
1471-(6 rows)
1472-
1473-/*+SeqScan(t1) NoTidScan(t2)*/
1474-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1475-LOG: pg_hint_plan:
1476-used hint:
1477-SeqScan(t1)
1478-NoTidScan(t2)
1479-not used hint:
1480-duplication hint:
1481-error hint:
1482-
1483- QUERY PLAN
1484----------------------------------------
1485- Nested Loop
1486- -> Seq Scan on t1
1487- Filter: (ctid = '(1,1)'::tid)
1488- -> Index Scan using t2_pkey on t2
1489- Index Cond: (id = t1.id)
1490- Filter: (ctid = '(1,1)'::tid)
1491-(6 rows)
1492-
1493-/*+IndexScan(t1)*/
1494-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1495-LOG: pg_hint_plan:
1496-used hint:
1497-IndexScan(t1)
1498-not used hint:
1499-duplication hint:
1500-error hint:
1501-
1502- QUERY PLAN
1503------------------------------------------
1504- Nested Loop
1505- -> Tid Scan on t2
1506- TID Cond: (ctid = '(1,1)'::tid)
1507- -> Index Scan using t1_pkey on t1
1508- Index Cond: (id = t2.id)
1509- Filter: (ctid = '(1,1)'::tid)
1510-(6 rows)
1511-
1512-/*+IndexScan(t2)*/
1513-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1514-LOG: pg_hint_plan:
1515-used hint:
1516-IndexScan(t2)
1517-not used hint:
1518-duplication hint:
1519-error hint:
1520-
1521- QUERY PLAN
1522------------------------------------------
1523- Nested Loop
1524- -> Tid Scan on t1
1525- TID Cond: (ctid = '(1,1)'::tid)
1526- -> Index Scan using t2_pkey on t2
1527- Index Cond: (id = t1.id)
1528- Filter: (ctid = '(1,1)'::tid)
1529-(6 rows)
1530-
1531-/*+IndexScan(t1) SeqScan(t2)*/
1532-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1533-LOG: pg_hint_plan:
1534-used hint:
1535-IndexScan(t1)
1536-SeqScan(t2)
1537-not used hint:
1538-duplication hint:
1539-error hint:
1540-
1541- QUERY PLAN
1542----------------------------------------
1543- Nested Loop
1544- -> Seq Scan on t2
1545- Filter: (ctid = '(1,1)'::tid)
1546- -> Index Scan using t1_pkey on t1
1547- Index Cond: (id = t2.id)
1548- Filter: (ctid = '(1,1)'::tid)
1549-(6 rows)
1550-
1551-/*+IndexScan(t1) IndexScan(t2)*/
1552-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1553-LOG: pg_hint_plan:
1554-used hint:
1555-IndexScan(t1)
1556-IndexScan(t2)
1557-not used hint:
1558-duplication hint:
1559-error hint:
1560-
1561- QUERY PLAN
1562----------------------------------------
1563- Nested Loop
1564- -> Index Scan using t2_pkey on t2
1565- Filter: (ctid = '(1,1)'::tid)
1566- -> Index Scan using t1_pkey on t1
1567- Index Cond: (id = t2.id)
1568- Filter: (ctid = '(1,1)'::tid)
1569-(6 rows)
1570-
1571-/*+IndexScan(t1) BitmapScan(t2)*/
1572-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1573-LOG: pg_hint_plan:
1574-used hint:
1575-IndexScan(t1)
1576-BitmapScan(t2)
1577-not used hint:
1578-duplication hint:
1579-error hint:
1580-
1581- QUERY PLAN
1582-------------------------------------------
1583- Nested Loop
1584- -> Index Scan using t1_pkey on t1
1585- Filter: (ctid = '(1,1)'::tid)
1586- -> Bitmap Heap Scan on t2
1587- Recheck Cond: (id = t1.id)
1588- Filter: (ctid = '(1,1)'::tid)
1589- -> Bitmap Index Scan on t2_pkey
1590- Index Cond: (id = t1.id)
1591-(8 rows)
1592-
1593-/*+IndexScan(t1) TidScan(t2)*/
1594-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1595-LOG: pg_hint_plan:
1596-used hint:
1597-IndexScan(t1)
1598-TidScan(t2)
1599-not used hint:
1600-duplication hint:
1601-error hint:
1602-
1603- QUERY PLAN
1604------------------------------------------
1605- Nested Loop
1606- -> Tid Scan on t2
1607- TID Cond: (ctid = '(1,1)'::tid)
1608- -> Index Scan using t1_pkey on t1
1609- Index Cond: (id = t2.id)
1610- Filter: (ctid = '(1,1)'::tid)
1611-(6 rows)
1612-
1613-/*+IndexScan(t1) NoSeqScan(t2)*/
1614-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1615-LOG: pg_hint_plan:
1616-used hint:
1617-IndexScan(t1)
1618-NoSeqScan(t2)
1619-not used hint:
1620-duplication hint:
1621-error hint:
1622-
1623- QUERY PLAN
1624------------------------------------------
1625- Nested Loop
1626- -> Tid Scan on t2
1627- TID Cond: (ctid = '(1,1)'::tid)
1628- -> Index Scan using t1_pkey on t1
1629- Index Cond: (id = t2.id)
1630- Filter: (ctid = '(1,1)'::tid)
1631-(6 rows)
1632-
1633-/*+IndexScan(t1) NoIndexScan(t2)*/
1634-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1635-LOG: pg_hint_plan:
1636-used hint:
1637-IndexScan(t1)
1638-NoIndexScan(t2)
1639-not used hint:
1640-duplication hint:
1641-error hint:
1642-
1643- QUERY PLAN
1644------------------------------------------
1645- Nested Loop
1646- -> Tid Scan on t2
1647- TID Cond: (ctid = '(1,1)'::tid)
1648- -> Index Scan using t1_pkey on t1
1649- Index Cond: (id = t2.id)
1650- Filter: (ctid = '(1,1)'::tid)
1651-(6 rows)
1652-
1653-/*+IndexScan(t1) NoBitmapScan(t2)*/
1654-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1655-LOG: pg_hint_plan:
1656-used hint:
1657-IndexScan(t1)
1658-NoBitmapScan(t2)
1659-not used hint:
1660-duplication hint:
1661-error hint:
1662-
1663- QUERY PLAN
1664------------------------------------------
1665- Nested Loop
1666- -> Tid Scan on t2
1667- TID Cond: (ctid = '(1,1)'::tid)
1668- -> Index Scan using t1_pkey on t1
1669- Index Cond: (id = t2.id)
1670- Filter: (ctid = '(1,1)'::tid)
1671-(6 rows)
1672-
1673-/*+IndexScan(t1) NoTidScan(t2)*/
1674-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1675-LOG: pg_hint_plan:
1676-used hint:
1677-IndexScan(t1)
1678-NoTidScan(t2)
1679-not used hint:
1680-duplication hint:
1681-error hint:
1682-
1683- QUERY PLAN
1684----------------------------------------
1685- Nested Loop
1686- -> Seq Scan on t2
1687- Filter: (ctid = '(1,1)'::tid)
1688- -> Index Scan using t1_pkey on t1
1689- Index Cond: (id = t2.id)
1690- Filter: (ctid = '(1,1)'::tid)
1691-(6 rows)
1692-
1693-/*+BitmapScan(t1)*/
1694-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1695-LOG: pg_hint_plan:
1696-used hint:
1697-BitmapScan(t1)
1698-not used hint:
1699-duplication hint:
1700-error hint:
1701-
1702- QUERY PLAN
1703-------------------------------------------
1704- Nested Loop
1705- -> Tid Scan on t2
1706- TID Cond: (ctid = '(1,1)'::tid)
1707- -> Bitmap Heap Scan on t1
1708- Recheck Cond: (id = t2.id)
1709- Filter: (ctid = '(1,1)'::tid)
1710- -> Bitmap Index Scan on t1_pkey
1711- Index Cond: (id = t2.id)
1712-(8 rows)
1713-
1714-/*+BitmapScan(t2)*/
1715-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1716-LOG: pg_hint_plan:
1717-used hint:
1718-BitmapScan(t2)
1719-not used hint:
1720-duplication hint:
1721-error hint:
1722-
1723- QUERY PLAN
1724-------------------------------------------
1725- Nested Loop
1726- -> Tid Scan on t1
1727- TID Cond: (ctid = '(1,1)'::tid)
1728- -> Bitmap Heap Scan on t2
1729- Recheck Cond: (id = t1.id)
1730- Filter: (ctid = '(1,1)'::tid)
1731- -> Bitmap Index Scan on t2_pkey
1732- Index Cond: (id = t1.id)
1733-(8 rows)
1734-
1735-/*+BitmapScan(t2)*/
1736-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1737-LOG: pg_hint_plan:
1738-used hint:
1739-BitmapScan(t2)
1740-not used hint:
1741-duplication hint:
1742-error hint:
1743-
1744- QUERY PLAN
1745-------------------------------------------
1746- Nested Loop
1747- -> Tid Scan on t1
1748- TID Cond: (ctid = '(1,1)'::tid)
1749- -> Bitmap Heap Scan on t2
1750- Recheck Cond: (id = t1.id)
1751- Filter: (ctid = '(1,1)'::tid)
1752- -> Bitmap Index Scan on t2_pkey
1753- Index Cond: (id = t1.id)
1754-(8 rows)
1755-
1756-/*+BitmapScan(t1) SeqScan(t2)*/
1757-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1758-LOG: pg_hint_plan:
1759-used hint:
1760-BitmapScan(t1)
1761-SeqScan(t2)
1762-not used hint:
1763-duplication hint:
1764-error hint:
1765-
1766- QUERY PLAN
1767-------------------------------------------
1768- Nested Loop
1769- -> Seq Scan on t2
1770- Filter: (ctid = '(1,1)'::tid)
1771- -> Bitmap Heap Scan on t1
1772- Recheck Cond: (id = t2.id)
1773- Filter: (ctid = '(1,1)'::tid)
1774- -> Bitmap Index Scan on t1_pkey
1775- Index Cond: (id = t2.id)
1776-(8 rows)
1777-
1778-/*+BitmapScan(t1) IndexScan(t2)*/
1779-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1780-LOG: pg_hint_plan:
1781-used hint:
1782-BitmapScan(t1)
1783-IndexScan(t2)
1784-not used hint:
1785-duplication hint:
1786-error hint:
1787-
1788- QUERY PLAN
1789-------------------------------------------
1790- Nested Loop
1791- -> Index Scan using t2_pkey on t2
1792- Filter: (ctid = '(1,1)'::tid)
1793- -> Bitmap Heap Scan on t1
1794- Recheck Cond: (id = t2.id)
1795- Filter: (ctid = '(1,1)'::tid)
1796- -> Bitmap Index Scan on t1_pkey
1797- Index Cond: (id = t2.id)
1798-(8 rows)
1799-
1800-/*+BitmapScan(t1) BitmapScan(t2)*/
1801-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1802-LOG: pg_hint_plan:
1803-used hint:
1804-BitmapScan(t1)
1805-BitmapScan(t2)
1806-not used hint:
1807-duplication hint:
1808-error hint:
1809-
1810- QUERY PLAN
1811-------------------------------------------
1812- Nested Loop
1813- -> Index Scan using t2_pkey on t2
1814- Filter: (ctid = '(1,1)'::tid)
1815- -> Bitmap Heap Scan on t1
1816- Recheck Cond: (id = t2.id)
1817- Filter: (ctid = '(1,1)'::tid)
1818- -> Bitmap Index Scan on t1_pkey
1819- Index Cond: (id = t2.id)
1820-(8 rows)
1821-
1822-/*+BitmapScan(t1) TidScan(t2)*/
1823-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1824-LOG: pg_hint_plan:
1825-used hint:
1826-BitmapScan(t1)
1827-TidScan(t2)
1828-not used hint:
1829-duplication hint:
1830-error hint:
1831-
1832- QUERY PLAN
1833-------------------------------------------
1834- Nested Loop
1835- -> Tid Scan on t2
1836- TID Cond: (ctid = '(1,1)'::tid)
1837- -> Bitmap Heap Scan on t1
1838- Recheck Cond: (id = t2.id)
1839- Filter: (ctid = '(1,1)'::tid)
1840- -> Bitmap Index Scan on t1_pkey
1841- Index Cond: (id = t2.id)
1842-(8 rows)
1843-
1844-/*+BitmapScan(t1) NoSeqScan(t2)*/
1845-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1846-LOG: pg_hint_plan:
1847-used hint:
1848-BitmapScan(t1)
1849-NoSeqScan(t2)
1850-not used hint:
1851-duplication hint:
1852-error hint:
1853-
1854- QUERY PLAN
1855-------------------------------------------
1856- Nested Loop
1857- -> Tid Scan on t2
1858- TID Cond: (ctid = '(1,1)'::tid)
1859- -> Bitmap Heap Scan on t1
1860- Recheck Cond: (id = t2.id)
1861- Filter: (ctid = '(1,1)'::tid)
1862- -> Bitmap Index Scan on t1_pkey
1863- Index Cond: (id = t2.id)
1864-(8 rows)
1865-
1866-/*+BitmapScan(t1) NoIndexScan(t2)*/
1867-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1868-LOG: pg_hint_plan:
1869-used hint:
1870-BitmapScan(t1)
1871-NoIndexScan(t2)
1872-not used hint:
1873-duplication hint:
1874-error hint:
1875-
1876- QUERY PLAN
1877-------------------------------------------
1878- Nested Loop
1879- -> Tid Scan on t2
1880- TID Cond: (ctid = '(1,1)'::tid)
1881- -> Bitmap Heap Scan on t1
1882- Recheck Cond: (id = t2.id)
1883- Filter: (ctid = '(1,1)'::tid)
1884- -> Bitmap Index Scan on t1_pkey
1885- Index Cond: (id = t2.id)
1886-(8 rows)
1887-
1888-/*+BitmapScan(t1) NoBitmapScan(t2)*/
1889-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1890-LOG: pg_hint_plan:
1891-used hint:
1892-BitmapScan(t1)
1893-NoBitmapScan(t2)
1894-not used hint:
1895-duplication hint:
1896-error hint:
1897-
1898- QUERY PLAN
1899-------------------------------------------
1900- Nested Loop
1901- -> Tid Scan on t2
1902- TID Cond: (ctid = '(1,1)'::tid)
1903- -> Bitmap Heap Scan on t1
1904- Recheck Cond: (id = t2.id)
1905- Filter: (ctid = '(1,1)'::tid)
1906- -> Bitmap Index Scan on t1_pkey
1907- Index Cond: (id = t2.id)
1908-(8 rows)
1909-
1910-/*+BitmapScan(t1) NoTidScan(t2)*/
1911-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1912-LOG: pg_hint_plan:
1913-used hint:
1914-BitmapScan(t1)
1915-NoTidScan(t2)
1916-not used hint:
1917-duplication hint:
1918-error hint:
1919-
1920- QUERY PLAN
1921-------------------------------------------
1922- Nested Loop
1923- -> Seq Scan on t2
1924- Filter: (ctid = '(1,1)'::tid)
1925- -> Bitmap Heap Scan on t1
1926- Recheck Cond: (id = t2.id)
1927- Filter: (ctid = '(1,1)'::tid)
1928- -> Bitmap Index Scan on t1_pkey
1929- Index Cond: (id = t2.id)
1930-(8 rows)
1931-
1932-/*+TidScan(t1)*/
1933-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1934-LOG: pg_hint_plan:
1935-used hint:
1936-TidScan(t1)
1937-not used hint:
1938-duplication hint:
1939-error hint:
1940-
1941- QUERY PLAN
1942------------------------------------------
1943- Nested Loop
1944- Join Filter: (t1.id = t2.id)
1945- -> Tid Scan on t1
1946- TID Cond: (ctid = '(1,1)'::tid)
1947- -> Tid Scan on t2
1948- TID Cond: (ctid = '(1,1)'::tid)
1949-(6 rows)
1950-
1951-/*+TidScan(t2)*/
1952-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1953-LOG: pg_hint_plan:
1954-used hint:
1955-TidScan(t2)
1956-not used hint:
1957-duplication hint:
1958-error hint:
1959-
1960- QUERY PLAN
1961------------------------------------------
1962- Nested Loop
1963- Join Filter: (t1.id = t2.id)
1964- -> Tid Scan on t1
1965- TID Cond: (ctid = '(1,1)'::tid)
1966- -> Tid Scan on t2
1967- TID Cond: (ctid = '(1,1)'::tid)
1968-(6 rows)
1969-
1970-/*+TidScan(t1) SeqScan(t2)*/
1971-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1972-LOG: pg_hint_plan:
1973-used hint:
1974-TidScan(t1)
1975-SeqScan(t2)
1976-not used hint:
1977-duplication hint:
1978-error hint:
1979-
1980- QUERY PLAN
1981------------------------------------------
1982- Nested Loop
1983- Join Filter: (t1.id = t2.id)
1984- -> Tid Scan on t1
1985- TID Cond: (ctid = '(1,1)'::tid)
1986- -> Seq Scan on t2
1987- Filter: (ctid = '(1,1)'::tid)
1988-(6 rows)
1989-
1990-/*+TidScan(t1) IndexScan(t2)*/
1991-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
1992-LOG: pg_hint_plan:
1993-used hint:
1994-TidScan(t1)
1995-IndexScan(t2)
1996-not used hint:
1997-duplication hint:
1998-error hint:
1999-
2000- QUERY PLAN
2001------------------------------------------
2002- Nested Loop
2003- -> Tid Scan on t1
2004- TID Cond: (ctid = '(1,1)'::tid)
2005- -> Index Scan using t2_pkey on t2
2006- Index Cond: (id = t1.id)
2007- Filter: (ctid = '(1,1)'::tid)
2008-(6 rows)
2009-
2010-/*+TidScan(t1) BitmapScan(t2)*/
2011-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2012-LOG: pg_hint_plan:
2013-used hint:
2014-TidScan(t1)
2015-BitmapScan(t2)
2016-not used hint:
2017-duplication hint:
2018-error hint:
2019-
2020- QUERY PLAN
2021-------------------------------------------
2022- Nested Loop
2023- -> Tid Scan on t1
2024- TID Cond: (ctid = '(1,1)'::tid)
2025- -> Bitmap Heap Scan on t2
2026- Recheck Cond: (id = t1.id)
2027- Filter: (ctid = '(1,1)'::tid)
2028- -> Bitmap Index Scan on t2_pkey
2029- Index Cond: (id = t1.id)
2030-(8 rows)
2031-
2032-/*+TidScan(t1) TidScan(t2)*/
2033-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2034-LOG: pg_hint_plan:
2035-used hint:
2036-TidScan(t1)
2037-TidScan(t2)
2038-not used hint:
2039-duplication hint:
2040-error hint:
2041-
2042- QUERY PLAN
2043------------------------------------------
2044- Nested Loop
2045- Join Filter: (t1.id = t2.id)
2046- -> Tid Scan on t1
2047- TID Cond: (ctid = '(1,1)'::tid)
2048- -> Tid Scan on t2
2049- TID Cond: (ctid = '(1,1)'::tid)
2050-(6 rows)
2051-
2052-/*+TidScan(t1) NoSeqScan(t2)*/
2053-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2054-LOG: pg_hint_plan:
2055-used hint:
2056-TidScan(t1)
2057-NoSeqScan(t2)
2058-not used hint:
2059-duplication hint:
2060-error hint:
2061-
2062- QUERY PLAN
2063------------------------------------------
2064- Nested Loop
2065- Join Filter: (t1.id = t2.id)
2066- -> Tid Scan on t1
2067- TID Cond: (ctid = '(1,1)'::tid)
2068- -> Tid Scan on t2
2069- TID Cond: (ctid = '(1,1)'::tid)
2070-(6 rows)
2071-
2072-/*+TidScan(t1) NoIndexScan(t2)*/
2073-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2074-LOG: pg_hint_plan:
2075-used hint:
2076-TidScan(t1)
2077-NoIndexScan(t2)
2078-not used hint:
2079-duplication hint:
2080-error hint:
2081-
2082- QUERY PLAN
2083------------------------------------------
2084- Nested Loop
2085- Join Filter: (t1.id = t2.id)
2086- -> Tid Scan on t1
2087- TID Cond: (ctid = '(1,1)'::tid)
2088- -> Tid Scan on t2
2089- TID Cond: (ctid = '(1,1)'::tid)
2090-(6 rows)
2091-
2092-/*+TidScan(t1) NoBitmapScan(t2)*/
2093-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2094-LOG: pg_hint_plan:
2095-used hint:
2096-TidScan(t1)
2097-NoBitmapScan(t2)
2098-not used hint:
2099-duplication hint:
2100-error hint:
2101-
2102- QUERY PLAN
2103------------------------------------------
2104- Nested Loop
2105- Join Filter: (t1.id = t2.id)
2106- -> Tid Scan on t1
2107- TID Cond: (ctid = '(1,1)'::tid)
2108- -> Tid Scan on t2
2109- TID Cond: (ctid = '(1,1)'::tid)
2110-(6 rows)
2111-
2112-/*+TidScan(t1) NoTidScan(t2)*/
2113-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2114-LOG: pg_hint_plan:
2115-used hint:
2116-TidScan(t1)
2117-NoTidScan(t2)
2118-not used hint:
2119-duplication hint:
2120-error hint:
2121-
2122- QUERY PLAN
2123------------------------------------------
2124- Nested Loop
2125- -> Tid Scan on t1
2126- TID Cond: (ctid = '(1,1)'::tid)
2127- -> Index Scan using t2_pkey on t2
2128- Index Cond: (id = t1.id)
2129- Filter: (ctid = '(1,1)'::tid)
2130-(6 rows)
2131-
2132-/*+NoSeqScan(t1)*/
2133-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2134-LOG: pg_hint_plan:
2135-used hint:
2136-NoSeqScan(t1)
2137-not used hint:
2138-duplication hint:
2139-error hint:
2140-
2141- QUERY PLAN
2142------------------------------------------
2143- Nested Loop
2144- Join Filter: (t1.id = t2.id)
2145- -> Tid Scan on t1
2146- TID Cond: (ctid = '(1,1)'::tid)
2147- -> Tid Scan on t2
2148- TID Cond: (ctid = '(1,1)'::tid)
2149-(6 rows)
2150-
2151-/*+NoSeqScan(t2)*/
2152-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2153-LOG: pg_hint_plan:
2154-used hint:
2155-NoSeqScan(t2)
2156-not used hint:
2157-duplication hint:
2158-error hint:
2159-
2160- QUERY PLAN
2161------------------------------------------
2162- Nested Loop
2163- Join Filter: (t1.id = t2.id)
2164- -> Tid Scan on t1
2165- TID Cond: (ctid = '(1,1)'::tid)
2166- -> Tid Scan on t2
2167- TID Cond: (ctid = '(1,1)'::tid)
2168-(6 rows)
2169-
2170-/*+NoSeqScan(t1) SeqScan(t2)*/
2171-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2172-LOG: pg_hint_plan:
2173-used hint:
2174-NoSeqScan(t1)
2175-SeqScan(t2)
2176-not used hint:
2177-duplication hint:
2178-error hint:
2179-
2180- QUERY PLAN
2181------------------------------------------
2182- Nested Loop
2183- Join Filter: (t1.id = t2.id)
2184- -> Tid Scan on t1
2185- TID Cond: (ctid = '(1,1)'::tid)
2186- -> Seq Scan on t2
2187- Filter: (ctid = '(1,1)'::tid)
2188-(6 rows)
2189-
2190-/*+NoSeqScan(t1) IndexScan(t2)*/
2191-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2192-LOG: pg_hint_plan:
2193-used hint:
2194-NoSeqScan(t1)
2195-IndexScan(t2)
2196-not used hint:
2197-duplication hint:
2198-error hint:
2199-
2200- QUERY PLAN
2201------------------------------------------
2202- Nested Loop
2203- -> Tid Scan on t1
2204- TID Cond: (ctid = '(1,1)'::tid)
2205- -> Index Scan using t2_pkey on t2
2206- Index Cond: (id = t1.id)
2207- Filter: (ctid = '(1,1)'::tid)
2208-(6 rows)
2209-
2210-/*+NoSeqScan(t1) BitmapScan(t2)*/
2211-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2212-LOG: pg_hint_plan:
2213-used hint:
2214-NoSeqScan(t1)
2215-BitmapScan(t2)
2216-not used hint:
2217-duplication hint:
2218-error hint:
2219-
2220- QUERY PLAN
2221-------------------------------------------
2222- Nested Loop
2223- -> Tid Scan on t1
2224- TID Cond: (ctid = '(1,1)'::tid)
2225- -> Bitmap Heap Scan on t2
2226- Recheck Cond: (id = t1.id)
2227- Filter: (ctid = '(1,1)'::tid)
2228- -> Bitmap Index Scan on t2_pkey
2229- Index Cond: (id = t1.id)
2230-(8 rows)
2231-
2232-/*+NoSeqScan(t1) TidScan(t2)*/
2233-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2234-LOG: pg_hint_plan:
2235-used hint:
2236-NoSeqScan(t1)
2237-TidScan(t2)
2238-not used hint:
2239-duplication hint:
2240-error hint:
2241-
2242- QUERY PLAN
2243------------------------------------------
2244- Nested Loop
2245- Join Filter: (t1.id = t2.id)
2246- -> Tid Scan on t1
2247- TID Cond: (ctid = '(1,1)'::tid)
2248- -> Tid Scan on t2
2249- TID Cond: (ctid = '(1,1)'::tid)
2250-(6 rows)
2251-
2252-/*+NoSeqScan(t1) NoSeqScan(t2)*/
2253-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2254-LOG: pg_hint_plan:
2255-used hint:
2256-NoSeqScan(t1)
2257-NoSeqScan(t2)
2258-not used hint:
2259-duplication hint:
2260-error hint:
2261-
2262- QUERY PLAN
2263------------------------------------------
2264- Nested Loop
2265- Join Filter: (t1.id = t2.id)
2266- -> Tid Scan on t1
2267- TID Cond: (ctid = '(1,1)'::tid)
2268- -> Tid Scan on t2
2269- TID Cond: (ctid = '(1,1)'::tid)
2270-(6 rows)
2271-
2272-/*+NoSeqScan(t1) NoIndexScan(t2)*/
2273-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2274-LOG: pg_hint_plan:
2275-used hint:
2276-NoSeqScan(t1)
2277-NoIndexScan(t2)
2278-not used hint:
2279-duplication hint:
2280-error hint:
2281-
2282- QUERY PLAN
2283------------------------------------------
2284- Nested Loop
2285- Join Filter: (t1.id = t2.id)
2286- -> Tid Scan on t1
2287- TID Cond: (ctid = '(1,1)'::tid)
2288- -> Tid Scan on t2
2289- TID Cond: (ctid = '(1,1)'::tid)
2290-(6 rows)
2291-
2292-/*+NoSeqScan(t1) NoBitmapScan(t2)*/
2293-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2294-LOG: pg_hint_plan:
2295-used hint:
2296-NoSeqScan(t1)
2297-NoBitmapScan(t2)
2298-not used hint:
2299-duplication hint:
2300-error hint:
2301-
2302- QUERY PLAN
2303------------------------------------------
2304- Nested Loop
2305- Join Filter: (t1.id = t2.id)
2306- -> Tid Scan on t1
2307- TID Cond: (ctid = '(1,1)'::tid)
2308- -> Tid Scan on t2
2309- TID Cond: (ctid = '(1,1)'::tid)
2310-(6 rows)
2311-
2312-/*+NoSeqScan(t1) NoTidScan(t2)*/
2313-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2314-LOG: pg_hint_plan:
2315-used hint:
2316-NoSeqScan(t1)
2317-NoTidScan(t2)
2318-not used hint:
2319-duplication hint:
2320-error hint:
2321-
2322- QUERY PLAN
2323------------------------------------------
2324- Nested Loop
2325- -> Tid Scan on t1
2326- TID Cond: (ctid = '(1,1)'::tid)
2327- -> Index Scan using t2_pkey on t2
2328- Index Cond: (id = t1.id)
2329- Filter: (ctid = '(1,1)'::tid)
2330-(6 rows)
2331-
2332-/*+NoIndexScan(t1)*/
2333-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2334-LOG: pg_hint_plan:
2335-used hint:
2336-NoIndexScan(t1)
2337-not used hint:
2338-duplication hint:
2339-error hint:
2340-
2341- QUERY PLAN
2342------------------------------------------
2343- Nested Loop
2344- Join Filter: (t1.id = t2.id)
2345- -> Tid Scan on t1
2346- TID Cond: (ctid = '(1,1)'::tid)
2347- -> Tid Scan on t2
2348- TID Cond: (ctid = '(1,1)'::tid)
2349-(6 rows)
2350-
2351-/*+NoIndexScan(t2)*/
2352-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2353-LOG: pg_hint_plan:
2354-used hint:
2355-NoIndexScan(t2)
2356-not used hint:
2357-duplication hint:
2358-error hint:
2359-
2360- QUERY PLAN
2361------------------------------------------
2362- Nested Loop
2363- Join Filter: (t1.id = t2.id)
2364- -> Tid Scan on t1
2365- TID Cond: (ctid = '(1,1)'::tid)
2366- -> Tid Scan on t2
2367- TID Cond: (ctid = '(1,1)'::tid)
2368-(6 rows)
2369-
2370-/*+NoIndexScan(t1) SeqScan(t2)*/
2371-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2372-LOG: pg_hint_plan:
2373-used hint:
2374-NoIndexScan(t1)
2375-SeqScan(t2)
2376-not used hint:
2377-duplication hint:
2378-error hint:
2379-
2380- QUERY PLAN
2381------------------------------------------
2382- Nested Loop
2383- Join Filter: (t1.id = t2.id)
2384- -> Tid Scan on t1
2385- TID Cond: (ctid = '(1,1)'::tid)
2386- -> Seq Scan on t2
2387- Filter: (ctid = '(1,1)'::tid)
2388-(6 rows)
2389-
2390-/*+NoIndexScan(t1) IndexScan(t2)*/
2391-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2392-LOG: pg_hint_plan:
2393-used hint:
2394-NoIndexScan(t1)
2395-IndexScan(t2)
2396-not used hint:
2397-duplication hint:
2398-error hint:
2399-
2400- QUERY PLAN
2401------------------------------------------
2402- Nested Loop
2403- -> Tid Scan on t1
2404- TID Cond: (ctid = '(1,1)'::tid)
2405- -> Index Scan using t2_pkey on t2
2406- Index Cond: (id = t1.id)
2407- Filter: (ctid = '(1,1)'::tid)
2408-(6 rows)
2409-
2410-/*+NoIndexScan(t1) BitmapScan(t2)*/
2411-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2412-LOG: pg_hint_plan:
2413-used hint:
2414-NoIndexScan(t1)
2415-BitmapScan(t2)
2416-not used hint:
2417-duplication hint:
2418-error hint:
2419-
2420- QUERY PLAN
2421-------------------------------------------
2422- Nested Loop
2423- -> Tid Scan on t1
2424- TID Cond: (ctid = '(1,1)'::tid)
2425- -> Bitmap Heap Scan on t2
2426- Recheck Cond: (id = t1.id)
2427- Filter: (ctid = '(1,1)'::tid)
2428- -> Bitmap Index Scan on t2_pkey
2429- Index Cond: (id = t1.id)
2430-(8 rows)
2431-
2432-/*+NoIndexScan(t1) TidScan(t2)*/
2433-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2434-LOG: pg_hint_plan:
2435-used hint:
2436-NoIndexScan(t1)
2437-TidScan(t2)
2438-not used hint:
2439-duplication hint:
2440-error hint:
2441-
2442- QUERY PLAN
2443------------------------------------------
2444- Nested Loop
2445- Join Filter: (t1.id = t2.id)
2446- -> Tid Scan on t1
2447- TID Cond: (ctid = '(1,1)'::tid)
2448- -> Tid Scan on t2
2449- TID Cond: (ctid = '(1,1)'::tid)
2450-(6 rows)
2451-
2452-/*+NoIndexScan(t1) NoSeqScan(t2)*/
2453-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2454-LOG: pg_hint_plan:
2455-used hint:
2456-NoIndexScan(t1)
2457-NoSeqScan(t2)
2458-not used hint:
2459-duplication hint:
2460-error hint:
2461-
2462- QUERY PLAN
2463------------------------------------------
2464- Nested Loop
2465- Join Filter: (t1.id = t2.id)
2466- -> Tid Scan on t1
2467- TID Cond: (ctid = '(1,1)'::tid)
2468- -> Tid Scan on t2
2469- TID Cond: (ctid = '(1,1)'::tid)
2470-(6 rows)
2471-
2472-/*+NoIndexScan(t1) NoIndexScan(t2)*/
2473-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2474-LOG: pg_hint_plan:
2475-used hint:
2476-NoIndexScan(t1)
2477-NoIndexScan(t2)
2478-not used hint:
2479-duplication hint:
2480-error hint:
2481-
2482- QUERY PLAN
2483------------------------------------------
2484- Nested Loop
2485- Join Filter: (t1.id = t2.id)
2486- -> Tid Scan on t1
2487- TID Cond: (ctid = '(1,1)'::tid)
2488- -> Tid Scan on t2
2489- TID Cond: (ctid = '(1,1)'::tid)
2490-(6 rows)
2491-
2492-/*+NoIndexScan(t1) NoBitmapScan(t2)*/
2493-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2494-LOG: pg_hint_plan:
2495-used hint:
2496-NoIndexScan(t1)
2497-NoBitmapScan(t2)
2498-not used hint:
2499-duplication hint:
2500-error hint:
2501-
2502- QUERY PLAN
2503------------------------------------------
2504- Nested Loop
2505- Join Filter: (t1.id = t2.id)
2506- -> Tid Scan on t1
2507- TID Cond: (ctid = '(1,1)'::tid)
2508- -> Tid Scan on t2
2509- TID Cond: (ctid = '(1,1)'::tid)
2510-(6 rows)
2511-
2512-/*+NoIndexScan(t1) NoTidScan(t2)*/
2513-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2514-LOG: pg_hint_plan:
2515-used hint:
2516-NoIndexScan(t1)
2517-NoTidScan(t2)
2518-not used hint:
2519-duplication hint:
2520-error hint:
2521-
2522- QUERY PLAN
2523------------------------------------------
2524- Nested Loop
2525- -> Tid Scan on t1
2526- TID Cond: (ctid = '(1,1)'::tid)
2527- -> Index Scan using t2_pkey on t2
2528- Index Cond: (id = t1.id)
2529- Filter: (ctid = '(1,1)'::tid)
2530-(6 rows)
2531-
2532-/*+NoBitmapScan(t1)*/
2533-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2534-LOG: pg_hint_plan:
2535-used hint:
2536-NoBitmapScan(t1)
2537-not used hint:
2538-duplication hint:
2539-error hint:
2540-
2541- QUERY PLAN
2542------------------------------------------
2543- Nested Loop
2544- Join Filter: (t1.id = t2.id)
2545- -> Tid Scan on t1
2546- TID Cond: (ctid = '(1,1)'::tid)
2547- -> Tid Scan on t2
2548- TID Cond: (ctid = '(1,1)'::tid)
2549-(6 rows)
2550-
2551-/*+NoBitmapScan(t2)*/
2552-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2553-LOG: pg_hint_plan:
2554-used hint:
2555-NoBitmapScan(t2)
2556-not used hint:
2557-duplication hint:
2558-error hint:
2559-
2560- QUERY PLAN
2561------------------------------------------
2562- Nested Loop
2563- Join Filter: (t1.id = t2.id)
2564- -> Tid Scan on t1
2565- TID Cond: (ctid = '(1,1)'::tid)
2566- -> Tid Scan on t2
2567- TID Cond: (ctid = '(1,1)'::tid)
2568-(6 rows)
2569-
2570-/*+NoBitmapScan(t1) SeqScan(t2)*/
2571-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2572-LOG: pg_hint_plan:
2573-used hint:
2574-NoBitmapScan(t1)
2575-SeqScan(t2)
2576-not used hint:
2577-duplication hint:
2578-error hint:
2579-
2580- QUERY PLAN
2581------------------------------------------
2582- Nested Loop
2583- Join Filter: (t1.id = t2.id)
2584- -> Tid Scan on t1
2585- TID Cond: (ctid = '(1,1)'::tid)
2586- -> Seq Scan on t2
2587- Filter: (ctid = '(1,1)'::tid)
2588-(6 rows)
2589-
2590-/*+NoBitmapScan(t1) IndexScan(t2)*/
2591-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2592-LOG: pg_hint_plan:
2593-used hint:
2594-NoBitmapScan(t1)
2595-IndexScan(t2)
2596-not used hint:
2597-duplication hint:
2598-error hint:
2599-
2600- QUERY PLAN
2601------------------------------------------
2602- Nested Loop
2603- -> Tid Scan on t1
2604- TID Cond: (ctid = '(1,1)'::tid)
2605- -> Index Scan using t2_pkey on t2
2606- Index Cond: (id = t1.id)
2607- Filter: (ctid = '(1,1)'::tid)
2608-(6 rows)
2609-
2610-/*+NoBitmapScan(t1) BitmapScan(t2)*/
2611-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2612-LOG: pg_hint_plan:
2613-used hint:
2614-NoBitmapScan(t1)
2615-BitmapScan(t2)
2616-not used hint:
2617-duplication hint:
2618-error hint:
2619-
2620- QUERY PLAN
2621-------------------------------------------
2622- Nested Loop
2623- -> Tid Scan on t1
2624- TID Cond: (ctid = '(1,1)'::tid)
2625- -> Bitmap Heap Scan on t2
2626- Recheck Cond: (id = t1.id)
2627- Filter: (ctid = '(1,1)'::tid)
2628- -> Bitmap Index Scan on t2_pkey
2629- Index Cond: (id = t1.id)
2630-(8 rows)
2631-
2632-/*+NoBitmapScan(t1) TidScan(t2)*/
2633-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2634-LOG: pg_hint_plan:
2635-used hint:
2636-NoBitmapScan(t1)
2637-TidScan(t2)
2638-not used hint:
2639-duplication hint:
2640-error hint:
2641-
2642- QUERY PLAN
2643------------------------------------------
2644- Nested Loop
2645- Join Filter: (t1.id = t2.id)
2646- -> Tid Scan on t1
2647- TID Cond: (ctid = '(1,1)'::tid)
2648- -> Tid Scan on t2
2649- TID Cond: (ctid = '(1,1)'::tid)
2650-(6 rows)
2651-
2652-/*+NoBitmapScan(t1) NoSeqScan(t2)*/
2653-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2654-LOG: pg_hint_plan:
2655-used hint:
2656-NoBitmapScan(t1)
2657-NoSeqScan(t2)
2658-not used hint:
2659-duplication hint:
2660-error hint:
2661-
2662- QUERY PLAN
2663------------------------------------------
2664- Nested Loop
2665- Join Filter: (t1.id = t2.id)
2666- -> Tid Scan on t1
2667- TID Cond: (ctid = '(1,1)'::tid)
2668- -> Tid Scan on t2
2669- TID Cond: (ctid = '(1,1)'::tid)
2670-(6 rows)
2671-
2672-/*+NoBitmapScan(t1) NoIndexScan(t2)*/
2673-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2674-LOG: pg_hint_plan:
2675-used hint:
2676-NoBitmapScan(t1)
2677-NoIndexScan(t2)
2678-not used hint:
2679-duplication hint:
2680-error hint:
2681-
2682- QUERY PLAN
2683------------------------------------------
2684- Nested Loop
2685- Join Filter: (t1.id = t2.id)
2686- -> Tid Scan on t1
2687- TID Cond: (ctid = '(1,1)'::tid)
2688- -> Tid Scan on t2
2689- TID Cond: (ctid = '(1,1)'::tid)
2690-(6 rows)
2691-
2692-/*+NoBitmapScan(t1) NoBitmapScan(t2)*/
2693-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2694-LOG: pg_hint_plan:
2695-used hint:
2696-NoBitmapScan(t1)
2697-NoBitmapScan(t2)
2698-not used hint:
2699-duplication hint:
2700-error hint:
2701-
2702- QUERY PLAN
2703------------------------------------------
2704- Nested Loop
2705- Join Filter: (t1.id = t2.id)
2706- -> Tid Scan on t1
2707- TID Cond: (ctid = '(1,1)'::tid)
2708- -> Tid Scan on t2
2709- TID Cond: (ctid = '(1,1)'::tid)
2710-(6 rows)
2711-
2712-/*+NoBitmapScan(t1) NoTidScan(t2)*/
2713-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2714-LOG: pg_hint_plan:
2715-used hint:
2716-NoBitmapScan(t1)
2717-NoTidScan(t2)
2718-not used hint:
2719-duplication hint:
2720-error hint:
2721-
2722- QUERY PLAN
2723------------------------------------------
2724- Nested Loop
2725- -> Tid Scan on t1
2726- TID Cond: (ctid = '(1,1)'::tid)
2727- -> Index Scan using t2_pkey on t2
2728- Index Cond: (id = t1.id)
2729- Filter: (ctid = '(1,1)'::tid)
2730-(6 rows)
2731-
2732-/*+NoTidScan(t1)*/
2733-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2734-LOG: pg_hint_plan:
2735-used hint:
2736-NoTidScan(t1)
2737-not used hint:
2738-duplication hint:
2739-error hint:
2740-
2741- QUERY PLAN
2742------------------------------------------
2743- Nested Loop
2744- -> Tid Scan on t2
2745- TID Cond: (ctid = '(1,1)'::tid)
2746- -> Index Scan using t1_pkey on t1
2747- Index Cond: (id = t2.id)
2748- Filter: (ctid = '(1,1)'::tid)
2749-(6 rows)
2750-
2751-/*+NoTidScan(t2)*/
2752-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2753-LOG: pg_hint_plan:
2754-used hint:
2755-NoTidScan(t2)
2756-not used hint:
2757-duplication hint:
2758-error hint:
2759-
2760- QUERY PLAN
2761------------------------------------------
2762- Nested Loop
2763- -> Tid Scan on t1
2764- TID Cond: (ctid = '(1,1)'::tid)
2765- -> Index Scan using t2_pkey on t2
2766- Index Cond: (id = t1.id)
2767- Filter: (ctid = '(1,1)'::tid)
2768-(6 rows)
2769-
2770-/*+NoTidScan(t1) SeqScan(t2)*/
2771-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2772-LOG: pg_hint_plan:
2773-used hint:
2774-NoTidScan(t1)
2775-SeqScan(t2)
2776-not used hint:
2777-duplication hint:
2778-error hint:
2779-
2780- QUERY PLAN
2781----------------------------------------
2782- Nested Loop
2783- -> Seq Scan on t2
2784- Filter: (ctid = '(1,1)'::tid)
2785- -> Index Scan using t1_pkey on t1
2786- Index Cond: (id = t2.id)
2787- Filter: (ctid = '(1,1)'::tid)
2788-(6 rows)
2789-
2790-/*+NoTidScan(t1) IndexScan(t2)*/
2791-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2792-LOG: pg_hint_plan:
2793-used hint:
2794-NoTidScan(t1)
2795-IndexScan(t2)
2796-not used hint:
2797-duplication hint:
2798-error hint:
2799-
2800- QUERY PLAN
2801----------------------------------------
2802- Nested Loop
2803- -> Index Scan using t2_pkey on t2
2804- Filter: (ctid = '(1,1)'::tid)
2805- -> Index Scan using t1_pkey on t1
2806- Index Cond: (id = t2.id)
2807- Filter: (ctid = '(1,1)'::tid)
2808-(6 rows)
2809-
2810-/*+NoTidScan(t1) BitmapScan(t2)*/
2811-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2812-LOG: pg_hint_plan:
2813-used hint:
2814-NoTidScan(t1)
2815-BitmapScan(t2)
2816-not used hint:
2817-duplication hint:
2818-error hint:
2819-
2820- QUERY PLAN
2821-------------------------------------------
2822- Nested Loop
2823- -> Seq Scan on t1
2824- Filter: (ctid = '(1,1)'::tid)
2825- -> Bitmap Heap Scan on t2
2826- Recheck Cond: (id = t1.id)
2827- Filter: (ctid = '(1,1)'::tid)
2828- -> Bitmap Index Scan on t2_pkey
2829- Index Cond: (id = t1.id)
2830-(8 rows)
2831-
2832-/*+NoTidScan(t1) TidScan(t2)*/
2833-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2834-LOG: pg_hint_plan:
2835-used hint:
2836-NoTidScan(t1)
2837-TidScan(t2)
2838-not used hint:
2839-duplication hint:
2840-error hint:
2841-
2842- QUERY PLAN
2843------------------------------------------
2844- Nested Loop
2845- -> Tid Scan on t2
2846- TID Cond: (ctid = '(1,1)'::tid)
2847- -> Index Scan using t1_pkey on t1
2848- Index Cond: (id = t2.id)
2849- Filter: (ctid = '(1,1)'::tid)
2850-(6 rows)
2851-
2852-/*+NoTidScan(t1) NoSeqScan(t2)*/
2853-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2854-LOG: pg_hint_plan:
2855-used hint:
2856-NoTidScan(t1)
2857-NoSeqScan(t2)
2858-not used hint:
2859-duplication hint:
2860-error hint:
2861-
2862- QUERY PLAN
2863------------------------------------------
2864- Nested Loop
2865- -> Tid Scan on t2
2866- TID Cond: (ctid = '(1,1)'::tid)
2867- -> Index Scan using t1_pkey on t1
2868- Index Cond: (id = t2.id)
2869- Filter: (ctid = '(1,1)'::tid)
2870-(6 rows)
2871-
2872-/*+NoTidScan(t1) NoIndexScan(t2)*/
2873-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2874-LOG: pg_hint_plan:
2875-used hint:
2876-NoTidScan(t1)
2877-NoIndexScan(t2)
2878-not used hint:
2879-duplication hint:
2880-error hint:
2881-
2882- QUERY PLAN
2883------------------------------------------
2884- Nested Loop
2885- -> Tid Scan on t2
2886- TID Cond: (ctid = '(1,1)'::tid)
2887- -> Index Scan using t1_pkey on t1
2888- Index Cond: (id = t2.id)
2889- Filter: (ctid = '(1,1)'::tid)
2890-(6 rows)
2891-
2892-/*+NoTidScan(t1) NoBitmapScan(t2)*/
2893-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2894-LOG: pg_hint_plan:
2895-used hint:
2896-NoTidScan(t1)
2897-NoBitmapScan(t2)
2898-not used hint:
2899-duplication hint:
2900-error hint:
2901-
2902- QUERY PLAN
2903------------------------------------------
2904- Nested Loop
2905- -> Tid Scan on t2
2906- TID Cond: (ctid = '(1,1)'::tid)
2907- -> Index Scan using t1_pkey on t1
2908- Index Cond: (id = t2.id)
2909- Filter: (ctid = '(1,1)'::tid)
2910-(6 rows)
2911-
2912-/*+NoTidScan(t1) NoTidScan(t2)*/
2913-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
2914-LOG: pg_hint_plan:
2915-used hint:
2916-NoTidScan(t1)
2917-NoTidScan(t2)
2918-not used hint:
2919-duplication hint:
2920-error hint:
2921-
2922- QUERY PLAN
2923----------------------------------------
2924- Nested Loop
2925- -> Seq Scan on t2
2926- Filter: (ctid = '(1,1)'::tid)
2927- -> Index Scan using t1_pkey on t1
2928- Index Cond: (id = t2.id)
2929- Filter: (ctid = '(1,1)'::tid)
2930-(6 rows)
2931-
2932--- additional test
2933-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)' AND t1.id < 10 AND t2.id < 10;
2934- QUERY PLAN
2935------------------------------------------
2936- Nested Loop
2937- Join Filter: (t1.id = t2.id)
2938- -> Tid Scan on t1
2939- TID Cond: (ctid = '(1,1)'::tid)
2940- Filter: (id < 10)
2941- -> Tid Scan on t2
2942- TID Cond: (ctid = '(1,1)'::tid)
2943- Filter: (id < 10)
2944-(8 rows)
2945-
2946-/*+BitmapScan(t1) BitmapScan(t2)*/
2947-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)' AND t1.id < 10 AND t2.id < 10;
2948-LOG: pg_hint_plan:
2949-used hint:
2950-BitmapScan(t1)
2951-BitmapScan(t2)
2952-not used hint:
2953-duplication hint:
2954-error hint:
2955-
2956- QUERY PLAN
2957---------------------------------------------------------
2958- Nested Loop
2959- -> Bitmap Heap Scan on t2
2960- Recheck Cond: (id < 10)
2961- Filter: (ctid = '(1,1)'::tid)
2962- -> Bitmap Index Scan on t2_pkey
2963- Index Cond: (id < 10)
2964- -> Bitmap Heap Scan on t1
2965- Recheck Cond: ((id < 10) AND (id = t2.id))
2966- Filter: (ctid = '(1,1)'::tid)
2967- -> Bitmap Index Scan on t1_pkey
2968- Index Cond: ((id < 10) AND (id = t2.id))
2969-(11 rows)
2970-
2971--- outer join test
2972-EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN t2 ON (t1.id = t2.id);
2973- QUERY PLAN
2974-------------------------------
2975- Hash Full Join
2976- Hash Cond: (t1.id = t2.id)
2977- -> Seq Scan on t1
2978- -> Hash
2979- -> Seq Scan on t2
2980-(5 rows)
2981-
2982-/*+MergeJoin(t1 t2)*/
2983-EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN t2 ON (t1.id = t2.id);
2984-LOG: pg_hint_plan:
2985-used hint:
2986-MergeJoin(t1 t2)
2987-not used hint:
2988-duplication hint:
2989-error hint:
2990-
2991- QUERY PLAN
2992---------------------------------------
2993- Merge Full Join
2994- Merge Cond: (t1.id = t2.id)
2995- -> Index Scan using t1_pkey on t1
2996- -> Index Scan using t2_pkey on t2
2997-(4 rows)
2998-
2999-/*+NestLoop(t1 t2)*/
3000-EXPLAIN (COSTS false) SELECT * FROM t1 FULL OUTER JOIN t2 ON (t1.id = t2.id);
3001-LOG: pg_hint_plan:
3002-used hint:
3003-NestLoop(t1 t2)
3004-not used hint:
3005-duplication hint:
3006-error hint:
3007-
3008- QUERY PLAN
3009-------------------------------
3010- Hash Full Join
3011- Hash Cond: (t1.id = t2.id)
3012- -> Seq Scan on t1
3013- -> Hash
3014- -> Seq Scan on t2
3015-(5 rows)
3016-
3017--- inherite table test
3018-SET constraint_exclusion TO off;
3019-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3020- QUERY PLAN
3021------------------------------------------------------------------------------
3022- Result
3023- -> Append
3024- -> Seq Scan on p1
3025- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3026- -> Seq Scan on p1_c1 p1
3027- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3028- -> Seq Scan on p1_c2 p1
3029- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3030- -> Seq Scan on p1_c3 p1
3031- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3032- -> Seq Scan on p1_c4 p1
3033- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3034- -> Seq Scan on p1_c1_c1 p1
3035- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3036- -> Seq Scan on p1_c1_c2 p1
3037- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3038- -> Seq Scan on p1_c3_c1 p1
3039- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3040- -> Seq Scan on p1_c3_c2 p1
3041- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3042-(20 rows)
3043-
3044-SET constraint_exclusion TO on;
3045-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3046- QUERY PLAN
3047------------------------------------------------------------------------------
3048- Result
3049- -> Append
3050- -> Seq Scan on p1
3051- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3052- -> Seq Scan on p1_c1 p1
3053- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3054- -> Seq Scan on p1_c1_c1 p1
3055- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3056- -> Seq Scan on p1_c1_c2 p1
3057- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3058-(10 rows)
3059-
3060-SET constraint_exclusion TO off;
3061-/*+SeqScan(p1)*/
3062-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3063-LOG: pg_hint_plan:
3064-used hint:
3065-SeqScan(p1)
3066-not used hint:
3067-duplication hint:
3068-error hint:
3069-
3070- QUERY PLAN
3071------------------------------------------------------------------------------
3072- Result
3073- -> Append
3074- -> Seq Scan on p1
3075- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3076- -> Seq Scan on p1_c1 p1
3077- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3078- -> Seq Scan on p1_c2 p1
3079- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3080- -> Seq Scan on p1_c3 p1
3081- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3082- -> Seq Scan on p1_c4 p1
3083- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3084- -> Seq Scan on p1_c1_c1 p1
3085- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3086- -> Seq Scan on p1_c1_c2 p1
3087- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3088- -> Seq Scan on p1_c3_c1 p1
3089- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3090- -> Seq Scan on p1_c3_c2 p1
3091- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3092-(20 rows)
3093-
3094-/*+IndexScan(p1)*/
3095-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3096-LOG: pg_hint_plan:
3097-used hint:
3098-IndexScan(p1)
3099-not used hint:
3100-duplication hint:
3101-error hint:
3102-
3103- QUERY PLAN
3104------------------------------------------------------------
3105- Result
3106- -> Append
3107- -> Index Scan using p1_pkey on p1
3108- Index Cond: ((id >= 50) AND (id <= 51))
3109- Filter: (ctid = '(1,1)'::tid)
3110- -> Index Scan using p1_c1_pkey on p1_c1 p1
3111- Index Cond: ((id >= 50) AND (id <= 51))
3112- Filter: (ctid = '(1,1)'::tid)
3113- -> Index Scan using p1_c2_pkey on p1_c2 p1
3114- Index Cond: ((id >= 50) AND (id <= 51))
3115- Filter: (ctid = '(1,1)'::tid)
3116- -> Index Scan using p1_c3_pkey on p1_c3 p1
3117- Index Cond: ((id >= 50) AND (id <= 51))
3118- Filter: (ctid = '(1,1)'::tid)
3119- -> Index Scan using p1_c4_pkey on p1_c4 p1
3120- Index Cond: ((id >= 50) AND (id <= 51))
3121- Filter: (ctid = '(1,1)'::tid)
3122- -> Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3123- Index Cond: ((id >= 50) AND (id <= 51))
3124- Filter: (ctid = '(1,1)'::tid)
3125- -> Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3126- Index Cond: ((id >= 50) AND (id <= 51))
3127- Filter: (ctid = '(1,1)'::tid)
3128- -> Index Scan using p1_c3_c1_pkey on p1_c3_c1 p1
3129- Index Cond: ((id >= 50) AND (id <= 51))
3130- Filter: (ctid = '(1,1)'::tid)
3131- -> Index Scan using p1_c3_c2_pkey on p1_c3_c2 p1
3132- Index Cond: ((id >= 50) AND (id <= 51))
3133- Filter: (ctid = '(1,1)'::tid)
3134-(29 rows)
3135-
3136-/*+BitmapScan(p1)*/
3137-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3138-LOG: pg_hint_plan:
3139-used hint:
3140-BitmapScan(p1)
3141-not used hint:
3142-duplication hint:
3143-error hint:
3144-
3145- QUERY PLAN
3146--------------------------------------------------------------
3147- Result
3148- -> Append
3149- -> Bitmap Heap Scan on p1
3150- Recheck Cond: ((id >= 50) AND (id <= 51))
3151- Filter: (ctid = '(1,1)'::tid)
3152- -> Bitmap Index Scan on p1_pkey
3153- Index Cond: ((id >= 50) AND (id <= 51))
3154- -> Bitmap Heap Scan on p1_c1 p1
3155- Recheck Cond: ((id >= 50) AND (id <= 51))
3156- Filter: (ctid = '(1,1)'::tid)
3157- -> Bitmap Index Scan on p1_c1_pkey
3158- Index Cond: ((id >= 50) AND (id <= 51))
3159- -> Bitmap Heap Scan on p1_c2 p1
3160- Recheck Cond: ((id >= 50) AND (id <= 51))
3161- Filter: (ctid = '(1,1)'::tid)
3162- -> Bitmap Index Scan on p1_c2_pkey
3163- Index Cond: ((id >= 50) AND (id <= 51))
3164- -> Bitmap Heap Scan on p1_c3 p1
3165- Recheck Cond: ((id >= 50) AND (id <= 51))
3166- Filter: (ctid = '(1,1)'::tid)
3167- -> Bitmap Index Scan on p1_c3_pkey
3168- Index Cond: ((id >= 50) AND (id <= 51))
3169- -> Bitmap Heap Scan on p1_c4 p1
3170- Recheck Cond: ((id >= 50) AND (id <= 51))
3171- Filter: (ctid = '(1,1)'::tid)
3172- -> Bitmap Index Scan on p1_c4_pkey
3173- Index Cond: ((id >= 50) AND (id <= 51))
3174- -> Bitmap Heap Scan on p1_c1_c1 p1
3175- Recheck Cond: ((id >= 50) AND (id <= 51))
3176- Filter: (ctid = '(1,1)'::tid)
3177- -> Bitmap Index Scan on p1_c1_c1_pkey
3178- Index Cond: ((id >= 50) AND (id <= 51))
3179- -> Bitmap Heap Scan on p1_c1_c2 p1
3180- Recheck Cond: ((id >= 50) AND (id <= 51))
3181- Filter: (ctid = '(1,1)'::tid)
3182- -> Bitmap Index Scan on p1_c1_c2_pkey
3183- Index Cond: ((id >= 50) AND (id <= 51))
3184- -> Bitmap Heap Scan on p1_c3_c1 p1
3185- Recheck Cond: ((id >= 50) AND (id <= 51))
3186- Filter: (ctid = '(1,1)'::tid)
3187- -> Bitmap Index Scan on p1_c3_c1_pkey
3188- Index Cond: ((id >= 50) AND (id <= 51))
3189- -> Bitmap Heap Scan on p1_c3_c2 p1
3190- Recheck Cond: ((id >= 50) AND (id <= 51))
3191- Filter: (ctid = '(1,1)'::tid)
3192- -> Bitmap Index Scan on p1_c3_c2_pkey
3193- Index Cond: ((id >= 50) AND (id <= 51))
3194-(47 rows)
3195-
3196-/*+TidScan(p1)*/
3197-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3198-LOG: pg_hint_plan:
3199-used hint:
3200-TidScan(p1)
3201-not used hint:
3202-duplication hint:
3203-error hint:
3204-
3205- QUERY PLAN
3206----------------------------------------------------
3207- Result
3208- -> Append
3209- -> Tid Scan on p1
3210- TID Cond: (ctid = '(1,1)'::tid)
3211- Filter: ((id >= 50) AND (id <= 51))
3212- -> Tid Scan on p1_c1 p1
3213- TID Cond: (ctid = '(1,1)'::tid)
3214- Filter: ((id >= 50) AND (id <= 51))
3215- -> Tid Scan on p1_c2 p1
3216- TID Cond: (ctid = '(1,1)'::tid)
3217- Filter: ((id >= 50) AND (id <= 51))
3218- -> Tid Scan on p1_c3 p1
3219- TID Cond: (ctid = '(1,1)'::tid)
3220- Filter: ((id >= 50) AND (id <= 51))
3221- -> Tid Scan on p1_c4 p1
3222- TID Cond: (ctid = '(1,1)'::tid)
3223- Filter: ((id >= 50) AND (id <= 51))
3224- -> Tid Scan on p1_c1_c1 p1
3225- TID Cond: (ctid = '(1,1)'::tid)
3226- Filter: ((id >= 50) AND (id <= 51))
3227- -> Tid Scan on p1_c1_c2 p1
3228- TID Cond: (ctid = '(1,1)'::tid)
3229- Filter: ((id >= 50) AND (id <= 51))
3230- -> Tid Scan on p1_c3_c1 p1
3231- TID Cond: (ctid = '(1,1)'::tid)
3232- Filter: ((id >= 50) AND (id <= 51))
3233- -> Tid Scan on p1_c3_c2 p1
3234- TID Cond: (ctid = '(1,1)'::tid)
3235- Filter: ((id >= 50) AND (id <= 51))
3236-(29 rows)
3237-
3238-SET constraint_exclusion TO on;
3239-/*+SeqScan(p1)*/
3240-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3241-LOG: pg_hint_plan:
3242-used hint:
3243-SeqScan(p1)
3244-not used hint:
3245-duplication hint:
3246-error hint:
3247-
3248- QUERY PLAN
3249------------------------------------------------------------------------------
3250- Result
3251- -> Append
3252- -> Seq Scan on p1
3253- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3254- -> Seq Scan on p1_c1 p1
3255- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3256- -> Seq Scan on p1_c1_c1 p1
3257- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3258- -> Seq Scan on p1_c1_c2 p1
3259- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3260-(10 rows)
3261-
3262-/*+IndexScan(p1)*/
3263-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3264-LOG: pg_hint_plan:
3265-used hint:
3266-IndexScan(p1)
3267-not used hint:
3268-duplication hint:
3269-error hint:
3270-
3271- QUERY PLAN
3272------------------------------------------------------------
3273- Result
3274- -> Append
3275- -> Index Scan using p1_pkey on p1
3276- Index Cond: ((id >= 50) AND (id <= 51))
3277- Filter: (ctid = '(1,1)'::tid)
3278- -> Index Scan using p1_c1_pkey on p1_c1 p1
3279- Index Cond: ((id >= 50) AND (id <= 51))
3280- Filter: (ctid = '(1,1)'::tid)
3281- -> Index Scan using p1_c1_c1_pkey on p1_c1_c1 p1
3282- Index Cond: ((id >= 50) AND (id <= 51))
3283- Filter: (ctid = '(1,1)'::tid)
3284- -> Index Scan using p1_c1_c2_pkey on p1_c1_c2 p1
3285- Index Cond: ((id >= 50) AND (id <= 51))
3286- Filter: (ctid = '(1,1)'::tid)
3287-(14 rows)
3288-
3289-/*+BitmapScan(p1)*/
3290-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3291-LOG: pg_hint_plan:
3292-used hint:
3293-BitmapScan(p1)
3294-not used hint:
3295-duplication hint:
3296-error hint:
3297-
3298- QUERY PLAN
3299--------------------------------------------------------------
3300- Result
3301- -> Append
3302- -> Bitmap Heap Scan on p1
3303- Recheck Cond: ((id >= 50) AND (id <= 51))
3304- Filter: (ctid = '(1,1)'::tid)
3305- -> Bitmap Index Scan on p1_pkey
3306- Index Cond: ((id >= 50) AND (id <= 51))
3307- -> Bitmap Heap Scan on p1_c1 p1
3308- Recheck Cond: ((id >= 50) AND (id <= 51))
3309- Filter: (ctid = '(1,1)'::tid)
3310- -> Bitmap Index Scan on p1_c1_pkey
3311- Index Cond: ((id >= 50) AND (id <= 51))
3312- -> Bitmap Heap Scan on p1_c1_c1 p1
3313- Recheck Cond: ((id >= 50) AND (id <= 51))
3314- Filter: (ctid = '(1,1)'::tid)
3315- -> Bitmap Index Scan on p1_c1_c1_pkey
3316- Index Cond: ((id >= 50) AND (id <= 51))
3317- -> Bitmap Heap Scan on p1_c1_c2 p1
3318- Recheck Cond: ((id >= 50) AND (id <= 51))
3319- Filter: (ctid = '(1,1)'::tid)
3320- -> Bitmap Index Scan on p1_c1_c2_pkey
3321- Index Cond: ((id >= 50) AND (id <= 51))
3322-(22 rows)
3323-
3324-/*+TidScan(p1)*/
3325-EXPLAIN (COSTS false) SELECT * FROM p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3326-LOG: pg_hint_plan:
3327-used hint:
3328-TidScan(p1)
3329-not used hint:
3330-duplication hint:
3331-error hint:
3332-
3333- QUERY PLAN
3334----------------------------------------------------
3335- Result
3336- -> Append
3337- -> Tid Scan on p1
3338- TID Cond: (ctid = '(1,1)'::tid)
3339- Filter: ((id >= 50) AND (id <= 51))
3340- -> Tid Scan on p1_c1 p1
3341- TID Cond: (ctid = '(1,1)'::tid)
3342- Filter: ((id >= 50) AND (id <= 51))
3343- -> Tid Scan on p1_c1_c1 p1
3344- TID Cond: (ctid = '(1,1)'::tid)
3345- Filter: ((id >= 50) AND (id <= 51))
3346- -> Tid Scan on p1_c1_c2 p1
3347- TID Cond: (ctid = '(1,1)'::tid)
3348- Filter: ((id >= 50) AND (id <= 51))
3349-(14 rows)
3350-
3351-SET constraint_exclusion TO off;
3352-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3353- QUERY PLAN
3354------------------------------------------------------------------------------------
3355- Merge Join
3356- Merge Cond: (public.p1.id = t1.id)
3357- -> Sort
3358- Sort Key: public.p1.id
3359- -> Append
3360- -> Seq Scan on p1
3361- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3362- -> Seq Scan on p1_c1 p1
3363- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3364- -> Seq Scan on p1_c2 p1
3365- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3366- -> Seq Scan on p1_c3 p1
3367- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3368- -> Seq Scan on p1_c4 p1
3369- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3370- -> Seq Scan on p1_c1_c1 p1
3371- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3372- -> Seq Scan on p1_c1_c2 p1
3373- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3374- -> Seq Scan on p1_c3_c1 p1
3375- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3376- -> Seq Scan on p1_c3_c2 p1
3377- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3378- -> Index Scan using t1_pkey on t1
3379- Index Cond: (id < 10)
3380-(25 rows)
3381-
3382-SET constraint_exclusion TO on;
3383-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3384- QUERY PLAN
3385------------------------------------------------------------------------------------
3386- Merge Join
3387- Merge Cond: (public.p1.id = t1.id)
3388- -> Sort
3389- Sort Key: public.p1.id
3390- -> Append
3391- -> Seq Scan on p1
3392- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3393- -> Seq Scan on p1_c1 p1
3394- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3395- -> Seq Scan on p1_c1_c1 p1
3396- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3397- -> Seq Scan on p1_c1_c2 p1
3398- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3399- -> Index Scan using t1_pkey on t1
3400- Index Cond: (id < 10)
3401-(15 rows)
3402-
3403-SET constraint_exclusion TO off;
3404-/*+SeqScan(p1)*/
3405-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3406-LOG: pg_hint_plan:
3407-used hint:
3408-SeqScan(p1)
3409-not used hint:
3410-duplication hint:
3411-error hint:
3412-
3413- QUERY PLAN
3414------------------------------------------------------------------------------------
3415- Merge Join
3416- Merge Cond: (public.p1.id = t1.id)
3417- -> Sort
3418- Sort Key: public.p1.id
3419- -> Append
3420- -> Seq Scan on p1
3421- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3422- -> Seq Scan on p1_c1 p1
3423- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3424- -> Seq Scan on p1_c2 p1
3425- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3426- -> Seq Scan on p1_c3 p1
3427- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3428- -> Seq Scan on p1_c4 p1
3429- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3430- -> Seq Scan on p1_c1_c1 p1
3431- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3432- -> Seq Scan on p1_c1_c2 p1
3433- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3434- -> Seq Scan on p1_c3_c1 p1
3435- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3436- -> Seq Scan on p1_c3_c2 p1
3437- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3438- -> Index Scan using t1_pkey on t1
3439- Index Cond: (id < 10)
3440-(25 rows)
3441-
3442-/*+IndexScan(p1)*/
3443-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3444-LOG: pg_hint_plan:
3445-used hint:
3446-IndexScan(p1)
3447-not used hint:
3448-duplication hint:
3449-error hint:
3450-
3451- QUERY PLAN
3452------------------------------------------------------------------------------------
3453- Merge Join
3454- Merge Cond: (public.p1.id = t1.id)
3455- -> Sort
3456- Sort Key: public.p1.id
3457- -> Append
3458- -> Seq Scan on p1
3459- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3460- -> Seq Scan on p1_c1 p1
3461- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3462- -> Seq Scan on p1_c2 p1
3463- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3464- -> Seq Scan on p1_c3 p1
3465- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3466- -> Seq Scan on p1_c4 p1
3467- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3468- -> Seq Scan on p1_c1_c1 p1
3469- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3470- -> Seq Scan on p1_c1_c2 p1
3471- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3472- -> Seq Scan on p1_c3_c1 p1
3473- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3474- -> Seq Scan on p1_c3_c2 p1
3475- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3476- -> Index Scan using t1_pkey on t1
3477- Index Cond: (id < 10)
3478-(25 rows)
3479-
3480-/*+BitmapScan(p1)*/
3481-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3482-LOG: pg_hint_plan:
3483-used hint:
3484-BitmapScan(p1)
3485-not used hint:
3486-duplication hint:
3487-error hint:
3488-
3489- QUERY PLAN
3490------------------------------------------------------------------------------------
3491- Merge Join
3492- Merge Cond: (public.p1.id = t1.id)
3493- -> Sort
3494- Sort Key: public.p1.id
3495- -> Append
3496- -> Seq Scan on p1
3497- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3498- -> Seq Scan on p1_c1 p1
3499- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3500- -> Seq Scan on p1_c2 p1
3501- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3502- -> Seq Scan on p1_c3 p1
3503- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3504- -> Seq Scan on p1_c4 p1
3505- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3506- -> Seq Scan on p1_c1_c1 p1
3507- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3508- -> Seq Scan on p1_c1_c2 p1
3509- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3510- -> Seq Scan on p1_c3_c1 p1
3511- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3512- -> Seq Scan on p1_c3_c2 p1
3513- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3514- -> Index Scan using t1_pkey on t1
3515- Index Cond: (id < 10)
3516-(25 rows)
3517-
3518-/*+TidScan(p1)*/
3519-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3520-LOG: pg_hint_plan:
3521-used hint:
3522-TidScan(p1)
3523-not used hint:
3524-duplication hint:
3525-error hint:
3526-
3527- QUERY PLAN
3528------------------------------------------------------------------------------------
3529- Merge Join
3530- Merge Cond: (public.p1.id = t1.id)
3531- -> Sort
3532- Sort Key: public.p1.id
3533- -> Append
3534- -> Seq Scan on p1
3535- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3536- -> Seq Scan on p1_c1 p1
3537- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3538- -> Seq Scan on p1_c2 p1
3539- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3540- -> Seq Scan on p1_c3 p1
3541- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3542- -> Seq Scan on p1_c4 p1
3543- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3544- -> Seq Scan on p1_c1_c1 p1
3545- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3546- -> Seq Scan on p1_c1_c2 p1
3547- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3548- -> Seq Scan on p1_c3_c1 p1
3549- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3550- -> Seq Scan on p1_c3_c2 p1
3551- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3552- -> Index Scan using t1_pkey on t1
3553- Index Cond: (id < 10)
3554-(25 rows)
3555-
3556-/*+NestLoop(p1 t1)*/
3557-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3558-LOG: pg_hint_plan:
3559-used hint:
3560-NestLoop(p1 t1)
3561-not used hint:
3562-duplication hint:
3563-error hint:
3564-
3565- QUERY PLAN
3566------------------------------------------------------------------------------
3567- Nested Loop
3568- Join Filter: (public.p1.id = t1.id)
3569- -> Append
3570- -> Seq Scan on p1
3571- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3572- -> Seq Scan on p1_c1 p1
3573- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3574- -> Seq Scan on p1_c2 p1
3575- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3576- -> Seq Scan on p1_c3 p1
3577- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3578- -> Seq Scan on p1_c4 p1
3579- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3580- -> Seq Scan on p1_c1_c1 p1
3581- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3582- -> Seq Scan on p1_c1_c2 p1
3583- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3584- -> Seq Scan on p1_c3_c1 p1
3585- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3586- -> Seq Scan on p1_c3_c2 p1
3587- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3588- -> Materialize
3589- -> Index Scan using t1_pkey on t1
3590- Index Cond: (id < 10)
3591-(24 rows)
3592-
3593-/*+MergeJoin(p1 t1)*/
3594-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3595-LOG: pg_hint_plan:
3596-used hint:
3597-MergeJoin(p1 t1)
3598-not used hint:
3599-duplication hint:
3600-error hint:
3601-
3602- QUERY PLAN
3603------------------------------------------------------------------------------------
3604- Merge Join
3605- Merge Cond: (public.p1.id = t1.id)
3606- -> Sort
3607- Sort Key: public.p1.id
3608- -> Append
3609- -> Seq Scan on p1
3610- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3611- -> Seq Scan on p1_c1 p1
3612- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3613- -> Seq Scan on p1_c2 p1
3614- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3615- -> Seq Scan on p1_c3 p1
3616- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3617- -> Seq Scan on p1_c4 p1
3618- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3619- -> Seq Scan on p1_c1_c1 p1
3620- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3621- -> Seq Scan on p1_c1_c2 p1
3622- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3623- -> Seq Scan on p1_c3_c1 p1
3624- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3625- -> Seq Scan on p1_c3_c2 p1
3626- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3627- -> Index Scan using t1_pkey on t1
3628- Index Cond: (id < 10)
3629-(25 rows)
3630-
3631-/*+HashJoin(p1 t1)*/
3632-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3633-LOG: pg_hint_plan:
3634-used hint:
3635-HashJoin(p1 t1)
3636-not used hint:
3637-duplication hint:
3638-error hint:
3639-
3640- QUERY PLAN
3641------------------------------------------------------------------------------
3642- Hash Join
3643- Hash Cond: (public.p1.id = t1.id)
3644- -> Append
3645- -> Seq Scan on p1
3646- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3647- -> Seq Scan on p1_c1 p1
3648- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3649- -> Seq Scan on p1_c2 p1
3650- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3651- -> Seq Scan on p1_c3 p1
3652- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3653- -> Seq Scan on p1_c4 p1
3654- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3655- -> Seq Scan on p1_c1_c1 p1
3656- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3657- -> Seq Scan on p1_c1_c2 p1
3658- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3659- -> Seq Scan on p1_c3_c1 p1
3660- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3661- -> Seq Scan on p1_c3_c2 p1
3662- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3663- -> Hash
3664- -> Index Scan using t1_pkey on t1
3665- Index Cond: (id < 10)
3666-(24 rows)
3667-
3668-SET constraint_exclusion TO on;
3669-/*+SeqScan(p1)*/
3670-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3671-LOG: pg_hint_plan:
3672-used hint:
3673-SeqScan(p1)
3674-not used hint:
3675-duplication hint:
3676-error hint:
3677-
3678- QUERY PLAN
3679------------------------------------------------------------------------------------
3680- Merge Join
3681- Merge Cond: (public.p1.id = t1.id)
3682- -> Sort
3683- Sort Key: public.p1.id
3684- -> Append
3685- -> Seq Scan on p1
3686- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3687- -> Seq Scan on p1_c1 p1
3688- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3689- -> Seq Scan on p1_c1_c1 p1
3690- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3691- -> Seq Scan on p1_c1_c2 p1
3692- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3693- -> Index Scan using t1_pkey on t1
3694- Index Cond: (id < 10)
3695-(15 rows)
3696-
3697-/*+IndexScan(p1)*/
3698-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3699-LOG: pg_hint_plan:
3700-used hint:
3701-IndexScan(p1)
3702-not used hint:
3703-duplication hint:
3704-error hint:
3705-
3706- QUERY PLAN
3707------------------------------------------------------------------------------------
3708- Merge Join
3709- Merge Cond: (public.p1.id = t1.id)
3710- -> Sort
3711- Sort Key: public.p1.id
3712- -> Append
3713- -> Seq Scan on p1
3714- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3715- -> Seq Scan on p1_c1 p1
3716- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3717- -> Seq Scan on p1_c1_c1 p1
3718- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3719- -> Seq Scan on p1_c1_c2 p1
3720- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3721- -> Index Scan using t1_pkey on t1
3722- Index Cond: (id < 10)
3723-(15 rows)
3724-
3725-/*+BitmapScan(p1)*/
3726-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3727-LOG: pg_hint_plan:
3728-used hint:
3729-BitmapScan(p1)
3730-not used hint:
3731-duplication hint:
3732-error hint:
3733-
3734- QUERY PLAN
3735------------------------------------------------------------------------------------
3736- Merge Join
3737- Merge Cond: (public.p1.id = t1.id)
3738- -> Sort
3739- Sort Key: public.p1.id
3740- -> Append
3741- -> Seq Scan on p1
3742- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3743- -> Seq Scan on p1_c1 p1
3744- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3745- -> Seq Scan on p1_c1_c1 p1
3746- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3747- -> Seq Scan on p1_c1_c2 p1
3748- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3749- -> Index Scan using t1_pkey on t1
3750- Index Cond: (id < 10)
3751-(15 rows)
3752-
3753-/*+TidScan(p1)*/
3754-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3755-LOG: pg_hint_plan:
3756-used hint:
3757-TidScan(p1)
3758-not used hint:
3759-duplication hint:
3760-error hint:
3761-
3762- QUERY PLAN
3763------------------------------------------------------------------------------------
3764- Merge Join
3765- Merge Cond: (public.p1.id = t1.id)
3766- -> Sort
3767- Sort Key: public.p1.id
3768- -> Append
3769- -> Seq Scan on p1
3770- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3771- -> Seq Scan on p1_c1 p1
3772- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3773- -> Seq Scan on p1_c1_c1 p1
3774- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3775- -> Seq Scan on p1_c1_c2 p1
3776- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3777- -> Index Scan using t1_pkey on t1
3778- Index Cond: (id < 10)
3779-(15 rows)
3780-
3781-/*+NestLoop(p1 t1)*/
3782-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3783-LOG: pg_hint_plan:
3784-used hint:
3785-NestLoop(p1 t1)
3786-not used hint:
3787-duplication hint:
3788-error hint:
3789-
3790- QUERY PLAN
3791------------------------------------------------------------------------------------
3792- Nested Loop
3793- Join Filter: (public.p1.id = t1.id)
3794- -> Index Scan using t1_pkey on t1
3795- Index Cond: (id < 10)
3796- -> Materialize
3797- -> Append
3798- -> Seq Scan on p1
3799- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3800- -> Seq Scan on p1_c1 p1
3801- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3802- -> Seq Scan on p1_c1_c1 p1
3803- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3804- -> Seq Scan on p1_c1_c2 p1
3805- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3806-(14 rows)
3807-
3808-/*+MergeJoin(p1 t1)*/
3809-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3810-LOG: pg_hint_plan:
3811-used hint:
3812-MergeJoin(p1 t1)
3813-not used hint:
3814-duplication hint:
3815-error hint:
3816-
3817- QUERY PLAN
3818------------------------------------------------------------------------------------
3819- Merge Join
3820- Merge Cond: (public.p1.id = t1.id)
3821- -> Sort
3822- Sort Key: public.p1.id
3823- -> Append
3824- -> Seq Scan on p1
3825- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3826- -> Seq Scan on p1_c1 p1
3827- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3828- -> Seq Scan on p1_c1_c1 p1
3829- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3830- -> Seq Scan on p1_c1_c2 p1
3831- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3832- -> Index Scan using t1_pkey on t1
3833- Index Cond: (id < 10)
3834-(15 rows)
3835-
3836-/*+HashJoin(p1 t1)*/
3837-EXPLAIN (COSTS false) SELECT * FROM p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3838-LOG: pg_hint_plan:
3839-used hint:
3840-HashJoin(p1 t1)
3841-not used hint:
3842-duplication hint:
3843-error hint:
3844-
3845- QUERY PLAN
3846------------------------------------------------------------------------------------
3847- Hash Join
3848- Hash Cond: (t1.id = public.p1.id)
3849- -> Index Scan using t1_pkey on t1
3850- Index Cond: (id < 10)
3851- -> Hash
3852- -> Append
3853- -> Seq Scan on p1
3854- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3855- -> Seq Scan on p1_c1 p1
3856- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3857- -> Seq Scan on p1_c1_c1 p1
3858- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3859- -> Seq Scan on p1_c1_c2 p1
3860- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3861-(14 rows)
3862-
3863-SET constraint_exclusion TO off;
3864-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3865- QUERY PLAN
3866------------------------------------------------------------------
3867- Seq Scan on p1
3868- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3869-(2 rows)
3870-
3871-SET constraint_exclusion TO on;
3872-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3873- QUERY PLAN
3874------------------------------------------------------------------
3875- Seq Scan on p1
3876- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3877-(2 rows)
3878-
3879-SET constraint_exclusion TO off;
3880-/*+SeqScan(p1)*/
3881-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3882-LOG: pg_hint_plan:
3883-used hint:
3884-SeqScan(p1)
3885-not used hint:
3886-duplication hint:
3887-error hint:
3888-
3889- QUERY PLAN
3890------------------------------------------------------------------
3891- Seq Scan on p1
3892- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3893-(2 rows)
3894-
3895-/*+IndexScan(p1)*/
3896-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3897-LOG: pg_hint_plan:
3898-used hint:
3899-IndexScan(p1)
3900-not used hint:
3901-duplication hint:
3902-error hint:
3903-
3904- QUERY PLAN
3905--------------------------------------------
3906- Index Scan using p1_pkey on p1
3907- Index Cond: ((id >= 50) AND (id <= 51))
3908- Filter: (ctid = '(1,1)'::tid)
3909-(3 rows)
3910-
3911-/*+BitmapScan(p1)*/
3912-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3913-LOG: pg_hint_plan:
3914-used hint:
3915-BitmapScan(p1)
3916-not used hint:
3917-duplication hint:
3918-error hint:
3919-
3920- QUERY PLAN
3921--------------------------------------------------
3922- Bitmap Heap Scan on p1
3923- Recheck Cond: ((id >= 50) AND (id <= 51))
3924- Filter: (ctid = '(1,1)'::tid)
3925- -> Bitmap Index Scan on p1_pkey
3926- Index Cond: ((id >= 50) AND (id <= 51))
3927-(5 rows)
3928-
3929-/*+TidScan(p1)*/
3930-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
3931-LOG: pg_hint_plan:
3932-used hint:
3933-TidScan(p1)
3934-not used hint:
3935-duplication hint:
3936-error hint:
3937-
3938- QUERY PLAN
3939----------------------------------------
3940- Tid Scan on p1
3941- TID Cond: (ctid = '(1,1)'::tid)
3942- Filter: ((id >= 50) AND (id <= 51))
3943-(3 rows)
3944-
3945-/*+NestLoop(p1 t1)*/
3946-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3947-LOG: pg_hint_plan:
3948-used hint:
3949-NestLoop(p1 t1)
3950-not used hint:
3951-duplication hint:
3952-error hint:
3953-
3954- QUERY PLAN
3955------------------------------------------------------------------------
3956- Nested Loop
3957- -> Seq Scan on p1
3958- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3959- -> Index Scan using t1_pkey on t1
3960- Index Cond: ((id < 10) AND (id = p1.id))
3961-(5 rows)
3962-
3963-/*+MergeJoin(p1 t1)*/
3964-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3965-LOG: pg_hint_plan:
3966-used hint:
3967-MergeJoin(p1 t1)
3968-not used hint:
3969-duplication hint:
3970-error hint:
3971-
3972- QUERY PLAN
3973------------------------------------------------------------------------------
3974- Merge Join
3975- Merge Cond: (p1.id = t1.id)
3976- -> Sort
3977- Sort Key: p1.id
3978- -> Seq Scan on p1
3979- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
3980- -> Index Scan using t1_pkey on t1
3981- Index Cond: (id < 10)
3982-(8 rows)
3983-
3984-/*+HashJoin(p1 t1)*/
3985-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
3986-LOG: pg_hint_plan:
3987-used hint:
3988-HashJoin(p1 t1)
3989-not used hint:
3990-duplication hint:
3991-error hint:
3992-
3993- QUERY PLAN
3994------------------------------------------------------------------------------
3995- Hash Join
3996- Hash Cond: (t1.id = p1.id)
3997- -> Index Scan using t1_pkey on t1
3998- Index Cond: (id < 10)
3999- -> Hash
4000- -> Seq Scan on p1
4001- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4002-(7 rows)
4003-
4004-SET constraint_exclusion TO on;
4005-/*+SeqScan(p1)*/
4006-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4007-LOG: pg_hint_plan:
4008-used hint:
4009-SeqScan(p1)
4010-not used hint:
4011-duplication hint:
4012-error hint:
4013-
4014- QUERY PLAN
4015------------------------------------------------------------------
4016- Seq Scan on p1
4017- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4018-(2 rows)
4019-
4020-/*+IndexScan(p1)*/
4021-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4022-LOG: pg_hint_plan:
4023-used hint:
4024-IndexScan(p1)
4025-not used hint:
4026-duplication hint:
4027-error hint:
4028-
4029- QUERY PLAN
4030--------------------------------------------
4031- Index Scan using p1_pkey on p1
4032- Index Cond: ((id >= 50) AND (id <= 51))
4033- Filter: (ctid = '(1,1)'::tid)
4034-(3 rows)
4035-
4036-/*+BitmapScan(p1)*/
4037-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4038-LOG: pg_hint_plan:
4039-used hint:
4040-BitmapScan(p1)
4041-not used hint:
4042-duplication hint:
4043-error hint:
4044-
4045- QUERY PLAN
4046--------------------------------------------------
4047- Bitmap Heap Scan on p1
4048- Recheck Cond: ((id >= 50) AND (id <= 51))
4049- Filter: (ctid = '(1,1)'::tid)
4050- -> Bitmap Index Scan on p1_pkey
4051- Index Cond: ((id >= 50) AND (id <= 51))
4052-(5 rows)
4053-
4054-/*+TidScan(p1)*/
4055-EXPLAIN (COSTS false) SELECT * FROM ONLY p1 WHERE id >= 50 AND id <= 51 AND p1.ctid = '(1,1)';
4056-LOG: pg_hint_plan:
4057-used hint:
4058-TidScan(p1)
4059-not used hint:
4060-duplication hint:
4061-error hint:
4062-
4063- QUERY PLAN
4064----------------------------------------
4065- Tid Scan on p1
4066- TID Cond: (ctid = '(1,1)'::tid)
4067- Filter: ((id >= 50) AND (id <= 51))
4068-(3 rows)
4069-
4070-/*+NestLoop(p1 t1)*/
4071-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4072-LOG: pg_hint_plan:
4073-used hint:
4074-NestLoop(p1 t1)
4075-not used hint:
4076-duplication hint:
4077-error hint:
4078-
4079- QUERY PLAN
4080------------------------------------------------------------------------
4081- Nested Loop
4082- -> Seq Scan on p1
4083- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4084- -> Index Scan using t1_pkey on t1
4085- Index Cond: ((id < 10) AND (id = p1.id))
4086-(5 rows)
4087-
4088-/*+MergeJoin(p1 t1)*/
4089-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4090-LOG: pg_hint_plan:
4091-used hint:
4092-MergeJoin(p1 t1)
4093-not used hint:
4094-duplication hint:
4095-error hint:
4096-
4097- QUERY PLAN
4098------------------------------------------------------------------------------
4099- Merge Join
4100- Merge Cond: (p1.id = t1.id)
4101- -> Sort
4102- Sort Key: p1.id
4103- -> Seq Scan on p1
4104- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4105- -> Index Scan using t1_pkey on t1
4106- Index Cond: (id < 10)
4107-(8 rows)
4108-
4109-/*+HashJoin(p1 t1)*/
4110-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4111-LOG: pg_hint_plan:
4112-used hint:
4113-HashJoin(p1 t1)
4114-not used hint:
4115-duplication hint:
4116-error hint:
4117-
4118- QUERY PLAN
4119------------------------------------------------------------------------------
4120- Hash Join
4121- Hash Cond: (t1.id = p1.id)
4122- -> Index Scan using t1_pkey on t1
4123- Index Cond: (id < 10)
4124- -> Hash
4125- -> Seq Scan on p1
4126- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4127-(7 rows)
4128-
4129-SET constraint_exclusion TO off;
4130-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4131- QUERY PLAN
4132------------------------------------------------------------------------
4133- Nested Loop
4134- -> Seq Scan on p1
4135- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4136- -> Index Scan using t1_pkey on t1
4137- Index Cond: ((id < 10) AND (id = p1.id))
4138-(5 rows)
4139-
4140-SET constraint_exclusion TO on;
4141-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4142- QUERY PLAN
4143------------------------------------------------------------------------
4144- Nested Loop
4145- -> Seq Scan on p1
4146- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4147- -> Index Scan using t1_pkey on t1
4148- Index Cond: ((id < 10) AND (id = p1.id))
4149-(5 rows)
4150-
4151-SET constraint_exclusion TO off;
4152-/*+SeqScan(p1)*/
4153-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4154-LOG: pg_hint_plan:
4155-used hint:
4156-SeqScan(p1)
4157-not used hint:
4158-duplication hint:
4159-error hint:
4160-
4161- QUERY PLAN
4162------------------------------------------------------------------------
4163- Nested Loop
4164- -> Seq Scan on p1
4165- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4166- -> Index Scan using t1_pkey on t1
4167- Index Cond: ((id < 10) AND (id = p1.id))
4168-(5 rows)
4169-
4170-/*+IndexScan(p1)*/
4171-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4172-LOG: pg_hint_plan:
4173-used hint:
4174-IndexScan(p1)
4175-not used hint:
4176-duplication hint:
4177-error hint:
4178-
4179- QUERY PLAN
4180---------------------------------------------------
4181- Nested Loop
4182- -> Index Scan using p1_pkey on p1
4183- Index Cond: ((id >= 50) AND (id <= 51))
4184- Filter: (ctid = '(1,1)'::tid)
4185- -> Index Scan using t1_pkey on t1
4186- Index Cond: ((id < 10) AND (id = p1.id))
4187-(6 rows)
4188-
4189-/*+BitmapScan(p1)*/
4190-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4191-LOG: pg_hint_plan:
4192-used hint:
4193-BitmapScan(p1)
4194-not used hint:
4195-duplication hint:
4196-error hint:
4197-
4198- QUERY PLAN
4199--------------------------------------------------------
4200- Nested Loop
4201- -> Bitmap Heap Scan on p1
4202- Recheck Cond: ((id >= 50) AND (id <= 51))
4203- Filter: (ctid = '(1,1)'::tid)
4204- -> Bitmap Index Scan on p1_pkey
4205- Index Cond: ((id >= 50) AND (id <= 51))
4206- -> Index Scan using t1_pkey on t1
4207- Index Cond: ((id < 10) AND (id = p1.id))
4208-(8 rows)
4209-
4210-/*+TidScan(p1)*/
4211-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4212-LOG: pg_hint_plan:
4213-used hint:
4214-TidScan(p1)
4215-not used hint:
4216-duplication hint:
4217-error hint:
4218-
4219- QUERY PLAN
4220---------------------------------------------------
4221- Nested Loop
4222- -> Tid Scan on p1
4223- TID Cond: (ctid = '(1,1)'::tid)
4224- Filter: ((id >= 50) AND (id <= 51))
4225- -> Index Scan using t1_pkey on t1
4226- Index Cond: ((id < 10) AND (id = p1.id))
4227-(6 rows)
4228-
4229-SET constraint_exclusion TO on;
4230-/*+SeqScan(p1)*/
4231-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4232-LOG: pg_hint_plan:
4233-used hint:
4234-SeqScan(p1)
4235-not used hint:
4236-duplication hint:
4237-error hint:
4238-
4239- QUERY PLAN
4240------------------------------------------------------------------------
4241- Nested Loop
4242- -> Seq Scan on p1
4243- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
4244- -> Index Scan using t1_pkey on t1
4245- Index Cond: ((id < 10) AND (id = p1.id))
4246-(5 rows)
4247-
4248-/*+IndexScan(p1)*/
4249-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4250-LOG: pg_hint_plan:
4251-used hint:
4252-IndexScan(p1)
4253-not used hint:
4254-duplication hint:
4255-error hint:
4256-
4257- QUERY PLAN
4258---------------------------------------------------
4259- Nested Loop
4260- -> Index Scan using p1_pkey on p1
4261- Index Cond: ((id >= 50) AND (id <= 51))
4262- Filter: (ctid = '(1,1)'::tid)
4263- -> Index Scan using t1_pkey on t1
4264- Index Cond: ((id < 10) AND (id = p1.id))
4265-(6 rows)
4266-
4267-/*+BitmapScan(p1)*/
4268-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4269-LOG: pg_hint_plan:
4270-used hint:
4271-BitmapScan(p1)
4272-not used hint:
4273-duplication hint:
4274-error hint:
4275-
4276- QUERY PLAN
4277--------------------------------------------------------
4278- Nested Loop
4279- -> Bitmap Heap Scan on p1
4280- Recheck Cond: ((id >= 50) AND (id <= 51))
4281- Filter: (ctid = '(1,1)'::tid)
4282- -> Bitmap Index Scan on p1_pkey
4283- Index Cond: ((id >= 50) AND (id <= 51))
4284- -> Index Scan using t1_pkey on t1
4285- Index Cond: ((id < 10) AND (id = p1.id))
4286-(8 rows)
4287-
4288-/*+TidScan(p1)*/
4289-EXPLAIN (COSTS false) SELECT * FROM ONLY p1, t1 WHERE p1.id >= 50 AND p1.id <= 51 AND p1.ctid = '(1,1)' AND p1.id = t1.id AND t1.id < 10;
4290-LOG: pg_hint_plan:
4291-used hint:
4292-TidScan(p1)
4293-not used hint:
4294-duplication hint:
4295-error hint:
4296-
4297- QUERY PLAN
4298---------------------------------------------------
4299- Nested Loop
4300- -> Tid Scan on p1
4301- TID Cond: (ctid = '(1,1)'::tid)
4302- Filter: ((id >= 50) AND (id <= 51))
4303- -> Index Scan using t1_pkey on t1
4304- Index Cond: ((id < 10) AND (id = p1.id))
4305-(6 rows)
4306-
4307--- quote test
4308-/*+SeqScan("""t1 ) ")IndexScan("t 2 """)HashJoin("""t1 ) "T3"t 2 """)Leading("""t1 ) "T3"t 2 """)Set(application_name"a a a"" a A")*/
4309-EXPLAIN (COSTS false) SELECT * FROM t1 """t1 ) ", t2 "t 2 """, t3 "T3" WHERE """t1 ) ".id = "t 2 """.id AND """t1 ) ".id = "T3".id;
4310-LOG: pg_hint_plan:
4311-used hint:
4312-SeqScan("""t1 ) ")
4313-IndexScan("t 2 """)
4314-HashJoin("""t1 ) " T3 "t 2 """)
4315-Leading("""t1 ) " T3 "t 2 """)
4316-Set(application_name "a a a"" a A")
4317-not used hint:
4318-duplication hint:
4319-error hint:
4320-
4321- QUERY PLAN
4322----------------------------------------------------------
4323- Hash Join
4324- Hash Cond: ("t 2 """.id = """t1 ) ".id)
4325- -> Index Scan using t2_pkey on t2 "t 2 """
4326- -> Hash
4327- -> Hash Join
4328- Hash Cond: ("""t1 ) ".id = "T3".id)
4329- -> Seq Scan on t1 """t1 ) "
4330- -> Hash
4331- -> Seq Scan on t3 "T3"
4332-(9 rows)
4333-
4334--- duplicate hint test
4335-/*+SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)*/
4336-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.ctid = '(1,1)' AND t2.ctid = '(1,1)';
4337-INFO: hint syntax error at or near "SeqScan(t1)SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4338-DETAIL: Conflict scan method hint.
4339-INFO: hint syntax error at or near "IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4340-DETAIL: Conflict scan method hint.
4341-INFO: hint syntax error at or near "BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4342-DETAIL: Conflict scan method hint.
4343-INFO: hint syntax error at or near "SeqScan(t2)IndexScan(t1)IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4344-DETAIL: Conflict scan method hint.
4345-INFO: hint syntax error at or near "IndexScan(t2)BitmapScan(t1)BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4346-DETAIL: Conflict scan method hint.
4347-INFO: hint syntax error at or near "BitmapScan(t2)TidScan(t1)TidScan(t2)HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4348-DETAIL: Conflict scan method hint.
4349-INFO: hint syntax error at or near "HashJoin(t1 t2)NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4350-DETAIL: Conflict join method hint.
4351-INFO: hint syntax error at or near "NestLoop(t2 t1)MergeJoin(t1 t2)Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4352-DETAIL: Conflict join method hint.
4353-INFO: hint syntax error at or near "Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4354-DETAIL: Conflict set hint.
4355-INFO: hint syntax error at or near "Leading(t1 t2)Leading(t2 t1)Set(enable_seqscan off)Set(enable_mergejoin on)Set(enable_seqscan on)"
4356-DETAIL: Conflict leading hint.
4357-LOG: pg_hint_plan:
4358-used hint:
4359-TidScan(t1)
4360-TidScan(t2)
4361-MergeJoin(t1 t2)
4362-Leading(t2 t1)
4363-Set(enable_mergejoin on)
4364-Set(enable_seqscan on)
4365-not used hint:
4366-duplication hint:
4367-SeqScan(t1)
4368-IndexScan(t1)
4369-BitmapScan(t1)
4370-SeqScan(t2)
4371-IndexScan(t2)
4372-BitmapScan(t2)
4373-HashJoin(t1 t2)
4374-NestLoop(t1 t2)
4375-Leading(t1 t2)
4376-Set(enable_seqscan off)
4377-error hint:
4378-
4379- QUERY PLAN
4380------------------------------------------------
4381- Merge Join
4382- Merge Cond: (t1.id = t2.id)
4383- -> Sort
4384- Sort Key: t1.id
4385- -> Tid Scan on t1
4386- TID Cond: (ctid = '(1,1)'::tid)
4387- -> Sort
4388- Sort Key: t2.id
4389- -> Tid Scan on t2
4390- TID Cond: (ctid = '(1,1)'::tid)
4391-(10 rows)
4392-
4393--- sub query Leading hint test
4394-SET from_collapse_limit TO 100;
4395-SET geqo_threshold TO 100;
4396-EXPLAIN (COSTS false)
4397-WITH c1_1(id) AS (
4398-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4399-)
4400-SELECT t1_1.id, (
4401-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4402-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4403-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4404-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4405-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4406-);
4407- QUERY PLAN
4408--------------------------------------------------------------------------
4409- Nested Loop
4410- CTE c1_1
4411- -> Aggregate
4412- -> Merge Join
4413- Merge Cond: (t1_5.id = t3_5.id)
4414- -> Merge Join
4415- Merge Cond: (t1_5.id = t2_5.id)
4416- -> Index Scan using t1_pkey on t1 t1_5
4417- -> Index Scan using t2_pkey on t2 t2_5
4418- -> Sort
4419- Sort Key: t3_5.id
4420- -> Seq Scan on t3 t3_5
4421- InitPlan 2 (returns $1)
4422- -> Aggregate
4423- -> Merge Join
4424- Merge Cond: (t1_2.id = t3_2.id)
4425- -> Merge Join
4426- Merge Cond: (t1_2.id = t2_2.id)
4427- -> Index Scan using t1_pkey on t1 t1_2
4428- -> Index Scan using t2_pkey on t2 t2_2
4429- -> Sort
4430- Sort Key: t3_2.id
4431- -> Seq Scan on t3 t3_2
4432- InitPlan 3 (returns $2)
4433- -> Aggregate
4434- -> Merge Join
4435- Merge Cond: (t1_4.id = t3_4.id)
4436- -> Merge Join
4437- Merge Cond: (t1_4.id = t2_4.id)
4438- -> Index Scan using t1_pkey on t1 t1_4
4439- -> Index Scan using t2_pkey on t2 t2_4
4440- -> Sort
4441- Sort Key: t3_4.id
4442- -> Seq Scan on t3 t3_4
4443- -> Nested Loop
4444- -> Nested Loop
4445- -> Nested Loop
4446- -> Nested Loop
4447- -> Nested Loop
4448- -> Index Scan using t1_pkey on t1 t1_1
4449- Index Cond: (id = $2)
4450- -> Seq Scan on t3 t3_1
4451- Filter: (id = $2)
4452- -> Index Scan using t2_pkey on t2 t2_1
4453- Index Cond: (id = $2)
4454- -> Index Scan using t1_pkey on t1 t1_3
4455- Index Cond: (id = $2)
4456- -> Index Scan using t2_pkey on t2 t2_3
4457- Index Cond: (id = $2)
4458- -> Seq Scan on t3 t3_3
4459- Filter: (id = $2)
4460- -> CTE Scan on c1_1
4461- Filter: (id = $2)
4462-(53 rows)
4463-
4464-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)*/
4465-EXPLAIN (COSTS false)
4466-WITH c1_1(id) AS (
4467-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4468-)
4469-SELECT t1_1.id, (
4470-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4471-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4472-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4473-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4474-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4475-);
4476-LOG: pg_hint_plan:
4477-used hint:
4478-HashJoin(t1_1 t3_1)
4479-NestLoop(t1_2 t2_2)
4480-MergeJoin(t1_3 t3_3)
4481-NestLoop(t1_4 t2_4)
4482-NestLoop(t1_5 t2_5)
4483-not used hint:
4484-duplication hint:
4485-error hint:
4486-
4487- QUERY PLAN
4488--------------------------------------------------------------------------
4489- Nested Loop
4490- CTE c1_1
4491- -> Aggregate
4492- -> Merge Join
4493- Merge Cond: (t1_5.id = t3_5.id)
4494- -> Nested Loop
4495- -> Index Scan using t2_pkey on t2 t2_5
4496- -> Index Scan using t1_pkey on t1 t1_5
4497- Index Cond: (id = t2_5.id)
4498- -> Sort
4499- Sort Key: t3_5.id
4500- -> Seq Scan on t3 t3_5
4501- InitPlan 2 (returns $2)
4502- -> Aggregate
4503- -> Merge Join
4504- Merge Cond: (t1_2.id = t3_2.id)
4505- -> Nested Loop
4506- -> Index Scan using t2_pkey on t2 t2_2
4507- -> Index Scan using t1_pkey on t1 t1_2
4508- Index Cond: (id = t2_2.id)
4509- -> Sort
4510- Sort Key: t3_2.id
4511- -> Seq Scan on t3 t3_2
4512- InitPlan 3 (returns $3)
4513- -> Aggregate
4514- -> Merge Join
4515- Merge Cond: (t1_4.id = t3_4.id)
4516- -> Nested Loop
4517- -> Index Scan using t2_pkey on t2 t2_4
4518- -> Index Scan using t1_pkey on t1 t1_4
4519- Index Cond: (id = t2_4.id)
4520- -> Sort
4521- Sort Key: t3_4.id
4522- -> Seq Scan on t3 t3_4
4523- -> Nested Loop
4524- -> Nested Loop
4525- -> Nested Loop
4526- -> Nested Loop
4527- -> Nested Loop
4528- -> Index Scan using t2_pkey on t2 t2_1
4529- Index Cond: (id = $3)
4530- -> Seq Scan on t3 t3_1
4531- Filter: (id = $3)
4532- -> Index Scan using t1_pkey on t1 t1_1
4533- Index Cond: (id = $3)
4534- -> Index Scan using t1_pkey on t1 t1_3
4535- Index Cond: (id = $3)
4536- -> Index Scan using t2_pkey on t2 t2_3
4537- Index Cond: (id = $3)
4538- -> Seq Scan on t3 t3_3
4539- Filter: (id = $3)
4540- -> CTE Scan on c1_1
4541- Filter: (id = $3)
4542-(53 rows)
4543-
4544-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t1_1 t1_2 t1_4 t1_5)*/
4545-EXPLAIN (COSTS false)
4546-WITH c1_1(id) AS (
4547-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4548-)
4549-SELECT t1_1.id, (
4550-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4551-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4552-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4553-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4554-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4555-);
4556-LOG: pg_hint_plan:
4557-used hint:
4558-HashJoin(t1_1 t3_1)
4559-NestLoop(t1_2 t2_2)
4560-MergeJoin(t1_3 t3_3)
4561-NestLoop(t1_4 t2_4)
4562-NestLoop(t1_5 t2_5)
4563-not used hint:
4564-Leading(a t1_1 t1_2 t1_4 t1_5)
4565-duplication hint:
4566-error hint:
4567-
4568- QUERY PLAN
4569--------------------------------------------------------------------------
4570- Nested Loop
4571- CTE c1_1
4572- -> Aggregate
4573- -> Merge Join
4574- Merge Cond: (t1_5.id = t3_5.id)
4575- -> Nested Loop
4576- -> Index Scan using t2_pkey on t2 t2_5
4577- -> Index Scan using t1_pkey on t1 t1_5
4578- Index Cond: (id = t2_5.id)
4579- -> Sort
4580- Sort Key: t3_5.id
4581- -> Seq Scan on t3 t3_5
4582- InitPlan 2 (returns $2)
4583- -> Aggregate
4584- -> Merge Join
4585- Merge Cond: (t1_2.id = t3_2.id)
4586- -> Nested Loop
4587- -> Index Scan using t2_pkey on t2 t2_2
4588- -> Index Scan using t1_pkey on t1 t1_2
4589- Index Cond: (id = t2_2.id)
4590- -> Sort
4591- Sort Key: t3_2.id
4592- -> Seq Scan on t3 t3_2
4593- InitPlan 3 (returns $3)
4594- -> Aggregate
4595- -> Merge Join
4596- Merge Cond: (t1_4.id = t3_4.id)
4597- -> Nested Loop
4598- -> Index Scan using t2_pkey on t2 t2_4
4599- -> Index Scan using t1_pkey on t1 t1_4
4600- Index Cond: (id = t2_4.id)
4601- -> Sort
4602- Sort Key: t3_4.id
4603- -> Seq Scan on t3 t3_4
4604- -> Nested Loop
4605- -> Nested Loop
4606- -> Nested Loop
4607- -> Nested Loop
4608- -> Nested Loop
4609- -> Index Scan using t2_pkey on t2 t2_1
4610- Index Cond: (id = $3)
4611- -> Seq Scan on t3 t3_1
4612- Filter: (id = $3)
4613- -> Index Scan using t1_pkey on t1 t1_1
4614- Index Cond: (id = $3)
4615- -> Index Scan using t1_pkey on t1 t1_3
4616- Index Cond: (id = $3)
4617- -> Index Scan using t2_pkey on t2 t2_3
4618- Index Cond: (id = $3)
4619- -> Seq Scan on t3 t3_3
4620- Filter: (id = $3)
4621- -> CTE Scan on c1_1
4622- Filter: (id = $3)
4623-(53 rows)
4624-
4625-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)*/
4626-EXPLAIN (COSTS false)
4627-WITH c1_1(id) AS (
4628-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4629-)
4630-SELECT t1_1.id, (
4631-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4632-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4633-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4634-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4635-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4636-);
4637-LOG: pg_hint_plan:
4638-used hint:
4639-HashJoin(t1_1 t3_1)
4640-NestLoop(t1_2 t2_2)
4641-MergeJoin(t1_3 t3_3)
4642-NestLoop(t1_4 t2_4)
4643-NestLoop(t1_5 t2_5)
4644-not used hint:
4645-Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)
4646-duplication hint:
4647-error hint:
4648-
4649- QUERY PLAN
4650--------------------------------------------------------------------------
4651- Nested Loop
4652- CTE c1_1
4653- -> Aggregate
4654- -> Merge Join
4655- Merge Cond: (t1_5.id = t3_5.id)
4656- -> Nested Loop
4657- -> Index Scan using t2_pkey on t2 t2_5
4658- -> Index Scan using t1_pkey on t1 t1_5
4659- Index Cond: (id = t2_5.id)
4660- -> Sort
4661- Sort Key: t3_5.id
4662- -> Seq Scan on t3 t3_5
4663- InitPlan 2 (returns $2)
4664- -> Aggregate
4665- -> Merge Join
4666- Merge Cond: (t1_2.id = t3_2.id)
4667- -> Nested Loop
4668- -> Index Scan using t2_pkey on t2 t2_2
4669- -> Index Scan using t1_pkey on t1 t1_2
4670- Index Cond: (id = t2_2.id)
4671- -> Sort
4672- Sort Key: t3_2.id
4673- -> Seq Scan on t3 t3_2
4674- InitPlan 3 (returns $3)
4675- -> Aggregate
4676- -> Merge Join
4677- Merge Cond: (t1_4.id = t3_4.id)
4678- -> Nested Loop
4679- -> Index Scan using t2_pkey on t2 t2_4
4680- -> Index Scan using t1_pkey on t1 t1_4
4681- Index Cond: (id = t2_4.id)
4682- -> Sort
4683- Sort Key: t3_4.id
4684- -> Seq Scan on t3 t3_4
4685- -> Nested Loop
4686- -> Nested Loop
4687- -> Nested Loop
4688- -> Nested Loop
4689- -> Nested Loop
4690- -> Index Scan using t2_pkey on t2 t2_1
4691- Index Cond: (id = $3)
4692- -> Seq Scan on t3 t3_1
4693- Filter: (id = $3)
4694- -> Index Scan using t1_pkey on t1 t1_1
4695- Index Cond: (id = $3)
4696- -> Index Scan using t1_pkey on t1 t1_3
4697- Index Cond: (id = $3)
4698- -> Index Scan using t2_pkey on t2 t2_3
4699- Index Cond: (id = $3)
4700- -> Seq Scan on t3 t3_3
4701- Filter: (id = $3)
4702- -> CTE Scan on c1_1
4703- Filter: (id = $3)
4704-(53 rows)
4705-
4706-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(t3_5 t2_5 t1_5)Leading(t3_2 t2_2 t1_2)Leading(t3_4 t2_4 t1_4)Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)*/
4707-EXPLAIN (COSTS false)
4708-WITH c1_1(id) AS (
4709-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4710-)
4711-SELECT t1_1.id, (
4712-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4713-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4714-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4715-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4716-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4717-);
4718-LOG: pg_hint_plan:
4719-used hint:
4720-Leading(t3_5 t2_5 t1_5)
4721-Leading(t3_2 t2_2 t1_2)
4722-Leading(t3_4 t2_4 t1_4)
4723-Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)
4724-not used hint:
4725-HashJoin(t1_1 t3_1)
4726-NestLoop(t1_2 t2_2)
4727-MergeJoin(t1_3 t3_3)
4728-NestLoop(t1_4 t2_4)
4729-NestLoop(t1_5 t2_5)
4730-duplication hint:
4731-error hint:
4732-
4733- QUERY PLAN
4734--------------------------------------------------------------------
4735- Nested Loop
4736- CTE c1_1
4737- -> Aggregate
4738- -> Merge Join
4739- Merge Cond: (t2_5.id = t1_5.id)
4740- -> Merge Join
4741- Merge Cond: (t2_5.id = t3_5.id)
4742- -> Index Scan using t2_pkey on t2 t2_5
4743- -> Sort
4744- Sort Key: t3_5.id
4745- -> Seq Scan on t3 t3_5
4746- -> Index Scan using t1_pkey on t1 t1_5
4747- InitPlan 2 (returns $1)
4748- -> Aggregate
4749- -> Merge Join
4750- Merge Cond: (t2_2.id = t1_2.id)
4751- -> Merge Join
4752- Merge Cond: (t2_2.id = t3_2.id)
4753- -> Index Scan using t2_pkey on t2 t2_2
4754- -> Sort
4755- Sort Key: t3_2.id
4756- -> Seq Scan on t3 t3_2
4757- -> Index Scan using t1_pkey on t1 t1_2
4758- InitPlan 3 (returns $2)
4759- -> Aggregate
4760- -> Merge Join
4761- Merge Cond: (t2_4.id = t1_4.id)
4762- -> Merge Join
4763- Merge Cond: (t2_4.id = t3_4.id)
4764- -> Index Scan using t2_pkey on t2 t2_4
4765- -> Sort
4766- Sort Key: t3_4.id
4767- -> Seq Scan on t3 t3_4
4768- -> Index Scan using t1_pkey on t1 t1_4
4769- -> Nested Loop
4770- -> Nested Loop
4771- -> Nested Loop
4772- -> Nested Loop
4773- -> Nested Loop
4774- -> Seq Scan on t3 t3_3
4775- Filter: (id = $2)
4776- -> CTE Scan on c1_1
4777- Filter: (id = $2)
4778- -> Index Scan using t2_pkey on t2 t2_3
4779- Index Cond: (id = $2)
4780- -> Index Scan using t1_pkey on t1 t1_3
4781- Index Cond: (id = $2)
4782- -> Seq Scan on t3 t3_1
4783- Filter: (id = $2)
4784- -> Index Scan using t2_pkey on t2 t2_1
4785- Index Cond: (id = $2)
4786- -> Index Scan using t1_pkey on t1 t1_1
4787- Index Cond: (id = $2)
4788-(53 rows)
4789-
4790-SET from_collapse_limit TO 1;
4791-EXPLAIN (COSTS false)
4792-WITH c1_1(id) AS (
4793-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4794-)
4795-SELECT t1_1.id, (
4796-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4797-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4798-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4799-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4800-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4801-);
4802- QUERY PLAN
4803----------------------------------------------------------------
4804- Nested Loop
4805- CTE c1_1
4806- -> Aggregate
4807- -> Merge Join
4808- Merge Cond: (t1_5.id = t3_5.id)
4809- -> Merge Join
4810- Merge Cond: (t1_5.id = t2_5.id)
4811- -> Index Scan using t1_pkey on t1 t1_5
4812- -> Index Scan using t2_pkey on t2 t2_5
4813- -> Sort
4814- Sort Key: t3_5.id
4815- -> Seq Scan on t3 t3_5
4816- InitPlan 2 (returns $1)
4817- -> Aggregate
4818- -> Merge Join
4819- Merge Cond: (t1_2.id = t3_2.id)
4820- -> Merge Join
4821- Merge Cond: (t1_2.id = t2_2.id)
4822- -> Index Scan using t1_pkey on t1 t1_2
4823- -> Index Scan using t2_pkey on t2 t2_2
4824- -> Sort
4825- Sort Key: t3_2.id
4826- -> Seq Scan on t3 t3_2
4827- InitPlan 3 (returns $2)
4828- -> Aggregate
4829- -> Merge Join
4830- Merge Cond: (t1_4.id = t3_4.id)
4831- -> Merge Join
4832- Merge Cond: (t1_4.id = t2_4.id)
4833- -> Index Scan using t1_pkey on t1 t1_4
4834- -> Index Scan using t2_pkey on t2 t2_4
4835- -> Sort
4836- Sort Key: t3_4.id
4837- -> Seq Scan on t3 t3_4
4838- -> Nested Loop
4839- -> Nested Loop
4840- -> Nested Loop
4841- -> Index Scan using t1_pkey on t1 t1_1
4842- Index Cond: (id = $2)
4843- -> Seq Scan on t3 t3_1
4844- Filter: (id = $2)
4845- -> Index Scan using t2_pkey on t2 t2_1
4846- Index Cond: (id = $2)
4847- -> Nested Loop
4848- -> Nested Loop
4849- -> Index Scan using t1_pkey on t1 t1_3
4850- Index Cond: (id = $2)
4851- -> Seq Scan on t3 t3_3
4852- Filter: (id = $2)
4853- -> Index Scan using t2_pkey on t2 t2_3
4854- Index Cond: (id = $2)
4855- -> CTE Scan on c1_1
4856- Filter: (id = $2)
4857-(53 rows)
4858-
4859-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)*/
4860-EXPLAIN (COSTS false)
4861-WITH c1_1(id) AS (
4862-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4863-)
4864-SELECT t1_1.id, (
4865-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4866-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4867-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4868-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4869-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4870-);
4871-LOG: pg_hint_plan:
4872-used hint:
4873-HashJoin(t1_1 t3_1)
4874-NestLoop(t1_2 t2_2)
4875-MergeJoin(t1_3 t3_3)
4876-NestLoop(t1_4 t2_4)
4877-NestLoop(t1_5 t2_5)
4878-not used hint:
4879-duplication hint:
4880-error hint:
4881-
4882- QUERY PLAN
4883----------------------------------------------------------------
4884- Nested Loop
4885- CTE c1_1
4886- -> Aggregate
4887- -> Merge Join
4888- Merge Cond: (t1_5.id = t3_5.id)
4889- -> Nested Loop
4890- -> Index Scan using t2_pkey on t2 t2_5
4891- -> Index Scan using t1_pkey on t1 t1_5
4892- Index Cond: (id = t2_5.id)
4893- -> Sort
4894- Sort Key: t3_5.id
4895- -> Seq Scan on t3 t3_5
4896- InitPlan 2 (returns $2)
4897- -> Aggregate
4898- -> Merge Join
4899- Merge Cond: (t1_2.id = t3_2.id)
4900- -> Nested Loop
4901- -> Index Scan using t2_pkey on t2 t2_2
4902- -> Index Scan using t1_pkey on t1 t1_2
4903- Index Cond: (id = t2_2.id)
4904- -> Sort
4905- Sort Key: t3_2.id
4906- -> Seq Scan on t3 t3_2
4907- InitPlan 3 (returns $3)
4908- -> Aggregate
4909- -> Merge Join
4910- Merge Cond: (t1_4.id = t3_4.id)
4911- -> Nested Loop
4912- -> Index Scan using t2_pkey on t2 t2_4
4913- -> Index Scan using t1_pkey on t1 t1_4
4914- Index Cond: (id = t2_4.id)
4915- -> Sort
4916- Sort Key: t3_4.id
4917- -> Seq Scan on t3 t3_4
4918- -> Nested Loop
4919- -> Nested Loop
4920- -> Nested Loop
4921- -> Index Scan using t2_pkey on t2 t2_1
4922- Index Cond: (id = $3)
4923- -> Seq Scan on t3 t3_1
4924- Filter: (id = $3)
4925- -> Index Scan using t1_pkey on t1 t1_1
4926- Index Cond: (id = $3)
4927- -> Nested Loop
4928- -> Nested Loop
4929- -> Index Scan using t2_pkey on t2 t2_3
4930- Index Cond: (id = $3)
4931- -> Seq Scan on t3 t3_3
4932- Filter: (id = $3)
4933- -> Index Scan using t1_pkey on t1 t1_3
4934- Index Cond: (id = $3)
4935- -> CTE Scan on c1_1
4936- Filter: (id = $3)
4937-(53 rows)
4938-
4939-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t1_1 t1_2 t1_4 t1_5)*/
4940-EXPLAIN (COSTS false)
4941-WITH c1_1(id) AS (
4942-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
4943-)
4944-SELECT t1_1.id, (
4945-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
4946-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
4947-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
4948-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
4949-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
4950-);
4951-LOG: pg_hint_plan:
4952-used hint:
4953-HashJoin(t1_1 t3_1)
4954-NestLoop(t1_2 t2_2)
4955-MergeJoin(t1_3 t3_3)
4956-NestLoop(t1_4 t2_4)
4957-NestLoop(t1_5 t2_5)
4958-not used hint:
4959-Leading(a t1_1 t1_2 t1_4 t1_5)
4960-duplication hint:
4961-error hint:
4962-
4963- QUERY PLAN
4964----------------------------------------------------------------
4965- Nested Loop
4966- CTE c1_1
4967- -> Aggregate
4968- -> Merge Join
4969- Merge Cond: (t1_5.id = t3_5.id)
4970- -> Nested Loop
4971- -> Index Scan using t2_pkey on t2 t2_5
4972- -> Index Scan using t1_pkey on t1 t1_5
4973- Index Cond: (id = t2_5.id)
4974- -> Sort
4975- Sort Key: t3_5.id
4976- -> Seq Scan on t3 t3_5
4977- InitPlan 2 (returns $2)
4978- -> Aggregate
4979- -> Merge Join
4980- Merge Cond: (t1_2.id = t3_2.id)
4981- -> Nested Loop
4982- -> Index Scan using t2_pkey on t2 t2_2
4983- -> Index Scan using t1_pkey on t1 t1_2
4984- Index Cond: (id = t2_2.id)
4985- -> Sort
4986- Sort Key: t3_2.id
4987- -> Seq Scan on t3 t3_2
4988- InitPlan 3 (returns $3)
4989- -> Aggregate
4990- -> Merge Join
4991- Merge Cond: (t1_4.id = t3_4.id)
4992- -> Nested Loop
4993- -> Index Scan using t2_pkey on t2 t2_4
4994- -> Index Scan using t1_pkey on t1 t1_4
4995- Index Cond: (id = t2_4.id)
4996- -> Sort
4997- Sort Key: t3_4.id
4998- -> Seq Scan on t3 t3_4
4999- -> Nested Loop
5000- -> Nested Loop
5001- -> Nested Loop
5002- -> Index Scan using t2_pkey on t2 t2_1
5003- Index Cond: (id = $3)
5004- -> Seq Scan on t3 t3_1
5005- Filter: (id = $3)
5006- -> Index Scan using t1_pkey on t1 t1_1
5007- Index Cond: (id = $3)
5008- -> Nested Loop
5009- -> Nested Loop
5010- -> Index Scan using t2_pkey on t2 t2_3
5011- Index Cond: (id = $3)
5012- -> Seq Scan on t3 t3_3
5013- Filter: (id = $3)
5014- -> Index Scan using t1_pkey on t1 t1_3
5015- Index Cond: (id = $3)
5016- -> CTE Scan on c1_1
5017- Filter: (id = $3)
5018-(53 rows)
5019-
5020-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)*/
5021-EXPLAIN (COSTS false)
5022-WITH c1_1(id) AS (
5023-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
5024-)
5025-SELECT t1_1.id, (
5026-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
5027-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
5028-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
5029-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
5030-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
5031-);
5032-LOG: pg_hint_plan:
5033-used hint:
5034-HashJoin(t1_1 t3_1)
5035-NestLoop(t1_2 t2_2)
5036-MergeJoin(t1_3 t3_3)
5037-NestLoop(t1_4 t2_4)
5038-NestLoop(t1_5 t2_5)
5039-not used hint:
5040-Leading(a t3_2 t3_5 t2_2 c1_1 t3_4 t3_3 t2_3 t2_4 t1_3 t2_5 t1_2 t3_1 t1_4 t2_1 t1_5 t1_1)
5041-duplication hint:
5042-error hint:
5043-
5044- QUERY PLAN
5045----------------------------------------------------------------
5046- Nested Loop
5047- CTE c1_1
5048- -> Aggregate
5049- -> Merge Join
5050- Merge Cond: (t1_5.id = t3_5.id)
5051- -> Nested Loop
5052- -> Index Scan using t2_pkey on t2 t2_5
5053- -> Index Scan using t1_pkey on t1 t1_5
5054- Index Cond: (id = t2_5.id)
5055- -> Sort
5056- Sort Key: t3_5.id
5057- -> Seq Scan on t3 t3_5
5058- InitPlan 2 (returns $2)
5059- -> Aggregate
5060- -> Merge Join
5061- Merge Cond: (t1_2.id = t3_2.id)
5062- -> Nested Loop
5063- -> Index Scan using t2_pkey on t2 t2_2
5064- -> Index Scan using t1_pkey on t1 t1_2
5065- Index Cond: (id = t2_2.id)
5066- -> Sort
5067- Sort Key: t3_2.id
5068- -> Seq Scan on t3 t3_2
5069- InitPlan 3 (returns $3)
5070- -> Aggregate
5071- -> Merge Join
5072- Merge Cond: (t1_4.id = t3_4.id)
5073- -> Nested Loop
5074- -> Index Scan using t2_pkey on t2 t2_4
5075- -> Index Scan using t1_pkey on t1 t1_4
5076- Index Cond: (id = t2_4.id)
5077- -> Sort
5078- Sort Key: t3_4.id
5079- -> Seq Scan on t3 t3_4
5080- -> Nested Loop
5081- -> Nested Loop
5082- -> Nested Loop
5083- -> Index Scan using t2_pkey on t2 t2_1
5084- Index Cond: (id = $3)
5085- -> Seq Scan on t3 t3_1
5086- Filter: (id = $3)
5087- -> Index Scan using t1_pkey on t1 t1_1
5088- Index Cond: (id = $3)
5089- -> Nested Loop
5090- -> Nested Loop
5091- -> Index Scan using t2_pkey on t2 t2_3
5092- Index Cond: (id = $3)
5093- -> Seq Scan on t3 t3_3
5094- Filter: (id = $3)
5095- -> Index Scan using t1_pkey on t1 t1_3
5096- Index Cond: (id = $3)
5097- -> CTE Scan on c1_1
5098- Filter: (id = $3)
5099-(53 rows)
5100-
5101-/*+HashJoin(t1_1 t3_1)MergeJoin(t1_3 t3_3)NestLoop(t1_2 t2_2)NestLoop(t1_4 t2_4)NestLoop(t1_5 t2_5)Leading(t3_5 t2_5 t1_5)Leading(t3_2 t2_2 t1_2)Leading(t3_4 t2_4 t1_4)Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)*/
5102-EXPLAIN (COSTS false)
5103-WITH c1_1(id) AS (
5104-SELECT max(t1_5.id) FROM t1 t1_5, t2 t2_5, t3 t3_5 WHERE t1_5.id = t2_5.id AND t2_5.id = t3_5.id
5105-)
5106-SELECT t1_1.id, (
5107-SELECT max(t1_2.id) FROM t1 t1_2, t2 t2_2, t3 t3_2 WHERE t1_2.id = t2_2.id AND t2_2.id = t3_2.id
5108-) FROM t1 t1_1, t2 t2_1, t3 t3_1, (
5109-SELECT t1_3.id FROM t1 t1_3, t2 t2_3, t3 t3_3 WHERE t1_3.id = t2_3.id AND t2_3.id = t3_3.id
5110-) v1_1(id), c1_1 WHERE t1_1.id = t2_1.id AND t2_1.id = t3_1.id AND t2_1.id = v1_1.id AND v1_1.id = c1_1.id AND t1_1.id = (
5111-SELECT max(t1_4.id) FROM t1 t1_4, t2 t2_4, t3 t3_4 WHERE t1_4.id = t2_4.id AND t2_4.id = t3_4.id
5112-);
5113-LOG: pg_hint_plan:
5114-used hint:
5115-MergeJoin(t1_3 t3_3)
5116-Leading(t3_5 t2_5 t1_5)
5117-Leading(t3_2 t2_2 t1_2)
5118-Leading(t3_4 t2_4 t1_4)
5119-Leading(c1_1 t3_3 t2_3 t1_3 t3_1 t2_1 t1_1)
5120-not used hint:
5121-HashJoin(t1_1 t3_1)
5122-NestLoop(t1_2 t2_2)
5123-NestLoop(t1_4 t2_4)
5124-NestLoop(t1_5 t2_5)
5125-duplication hint:
5126-error hint:
5127-
5128- QUERY PLAN
5129--------------------------------------------------------------------------
5130- Nested Loop
5131- CTE c1_1
5132- -> Aggregate
5133- -> Merge Join
5134- Merge Cond: (t2_5.id = t1_5.id)
5135- -> Merge Join
5136- Merge Cond: (t2_5.id = t3_5.id)
5137- -> Index Scan using t2_pkey on t2 t2_5
5138- -> Sort
5139- Sort Key: t3_5.id
5140- -> Seq Scan on t3 t3_5
5141- -> Index Scan using t1_pkey on t1 t1_5
5142- InitPlan 2 (returns $1)
5143- -> Aggregate
5144- -> Merge Join
5145- Merge Cond: (t2_2.id = t1_2.id)
5146- -> Merge Join
5147- Merge Cond: (t2_2.id = t3_2.id)
5148- -> Index Scan using t2_pkey on t2 t2_2
5149- -> Sort
5150- Sort Key: t3_2.id
5151- -> Seq Scan on t3 t3_2
5152- -> Index Scan using t1_pkey on t1 t1_2
5153- InitPlan 3 (returns $2)
5154- -> Aggregate
5155- -> Merge Join
5156- Merge Cond: (t2_4.id = t1_4.id)
5157- -> Merge Join
5158- Merge Cond: (t2_4.id = t3_4.id)
5159- -> Index Scan using t2_pkey on t2 t2_4
5160- -> Sort
5161- Sort Key: t3_4.id
5162- -> Seq Scan on t3 t3_4
5163- -> Index Scan using t1_pkey on t1 t1_4
5164- -> Nested Loop
5165- -> Nested Loop
5166- -> Nested Loop
5167- -> Nested Loop
5168- -> Nested Loop
5169- -> Index Scan using t2_pkey on t2 t2_3
5170- Index Cond: (id = $2)
5171- -> Seq Scan on t3 t3_3
5172- Filter: (id = $2)
5173- -> Index Scan using t1_pkey on t1 t1_3
5174- Index Cond: (id = $2)
5175- -> CTE Scan on c1_1
5176- Filter: (id = $2)
5177- -> Seq Scan on t3 t3_1
5178- Filter: (id = $2)
5179- -> Index Scan using t2_pkey on t2 t2_1
5180- Index Cond: (id = $2)
5181- -> Index Scan using t1_pkey on t1 t1_1
5182- Index Cond: (id = $2)
5183-(53 rows)
5184-
5185--- ambigous error
5186-EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5187- QUERY PLAN
5188------------------------------------------------
5189- Merge Join
5190- Merge Cond: (public.t1.id = t2.id)
5191- -> Merge Join
5192- Merge Cond: (public.t1.id = s0.t1.id)
5193- -> Index Scan using t1_pkey on t1
5194- -> Index Scan using t1_pkey on t1
5195- -> Index Scan using t2_pkey on t2
5196-(7 rows)
5197-
5198-/*+NestLoop(t1 t2)*/
5199-EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5200-INFO: hint syntax error at or near "NestLoop(t1 t2)"
5201-DETAIL: Relation name "t1" is ambiguous.
5202-LOG: pg_hint_plan:
5203-used hint:
5204-not used hint:
5205-duplication hint:
5206-error hint:
5207-NestLoop(t1 t2)
5208-
5209- QUERY PLAN
5210------------------------------------------------
5211- Merge Join
5212- Merge Cond: (public.t1.id = t2.id)
5213- -> Merge Join
5214- Merge Cond: (public.t1.id = s0.t1.id)
5215- -> Index Scan using t1_pkey on t1
5216- -> Index Scan using t1_pkey on t1
5217- -> Index Scan using t2_pkey on t2
5218-(7 rows)
5219-
5220-/*+Leading(t1 t2 t1)*/
5221-EXPLAIN (COSTS false) SELECT * FROM t1, s0.t1, t2 WHERE public.t1.id = s0.t1.id AND public.t1.id = t2.id;
5222-INFO: hint syntax error at or near "Leading(t1 t2 t1)"
5223-DETAIL: Relation name "t1" is ambiguous.
5224-LOG: pg_hint_plan:
5225-used hint:
5226-not used hint:
5227-duplication hint:
5228-error hint:
5229-Leading(t1 t2 t1)
5230-
5231- QUERY PLAN
5232------------------------------------------------
5233- Merge Join
5234- Merge Cond: (public.t1.id = t2.id)
5235- -> Merge Join
5236- Merge Cond: (public.t1.id = s0.t1.id)
5237- -> Index Scan using t1_pkey on t1
5238- -> Index Scan using t1_pkey on t1
5239- -> Index Scan using t2_pkey on t2
5240-(7 rows)
5241-
5242--- identifier length test
5243-EXPLAIN (COSTS false) SELECT * FROM t1 "123456789012345678901234567890123456789012345678901234567890123" JOIN t2 ON ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5244- QUERY PLAN
5245---------------------------------------------------------------------------------------------------------------
5246- Merge Join
5247- Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5248- -> Merge Join
5249- Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id)
5250- -> Index Scan using t1_pkey on t1 "123456789012345678901234567890123456789012345678901234567890123"
5251- -> Index Scan using t2_pkey on t2
5252- -> Sort
5253- Sort Key: t3.id
5254- -> Seq Scan on t3
5255-(9 rows)
5256-
5257-/*+
5258-Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5259-SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5260-MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5261-Set(123456789012345678901234567890123456789012345678901234567890123 1)
5262-*/
5263-EXPLAIN (COSTS false) SELECT * FROM t1 "123456789012345678901234567890123456789012345678901234567890123" JOIN t2 ON ("123456789012345678901234567890123456789012345678901234567890123".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5264-INFO: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5265-LOG: pg_hint_plan:
5266-used hint:
5267-SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5268-MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5269-Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5270-not used hint:
5271-duplication hint:
5272-error hint:
5273-Set(123456789012345678901234567890123456789012345678901234567890123 1)
5274-
5275- QUERY PLAN
5276-----------------------------------------------------------------------------------------------------
5277- Merge Join
5278- Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5279- -> Merge Join
5280- Merge Cond: (t2.id = "123456789012345678901234567890123456789012345678901234567890123".id)
5281- -> Index Scan using t2_pkey on t2
5282- -> Sort
5283- Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id
5284- -> Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123"
5285- -> Sort
5286- Sort Key: t3.id
5287- -> Seq Scan on t3
5288-(11 rows)
5289-
5290-/*+
5291-Leading(1234567890123456789012345678901234567890123456789012345678901234 t2 t3)
5292-SeqScan(1234567890123456789012345678901234567890123456789012345678901234)
5293-MergeJoin(1234567890123456789012345678901234567890123456789012345678901234 t2)
5294-Set(1234567890123456789012345678901234567890123456789012345678901234 1)
5295-Set(cursor_tuple_fraction 0.1234567890123456789012345678901234567890123456789012345678901234)
5296-*/
5297-EXPLAIN (COSTS false) SELECT * FROM t1 "1234567890123456789012345678901234567890123456789012345678901234" JOIN t2 ON ("1234567890123456789012345678901234567890123456789012345678901234".id = t2.id) JOIN t3 ON (t2.id = t3.id);
5298-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5299-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5300-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5301-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5302-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5303-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5304-INFO: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5305-LOG: pg_hint_plan:
5306-used hint:
5307-SeqScan(123456789012345678901234567890123456789012345678901234567890123)
5308-MergeJoin(123456789012345678901234567890123456789012345678901234567890123 t2)
5309-Leading(123456789012345678901234567890123456789012345678901234567890123 t2 t3)
5310-Set(cursor_tuple_fraction 0.1234567890123456789012345678901234567890123456789012345678901234)
5311-not used hint:
5312-duplication hint:
5313-error hint:
5314-Set(123456789012345678901234567890123456789012345678901234567890123 1)
5315-
5316- QUERY PLAN
5317-----------------------------------------------------------------------------------------------------
5318- Merge Join
5319- Merge Cond: ("123456789012345678901234567890123456789012345678901234567890123".id = t3.id)
5320- -> Merge Join
5321- Merge Cond: (t2.id = "123456789012345678901234567890123456789012345678901234567890123".id)
5322- -> Index Scan using t2_pkey on t2
5323- -> Sort
5324- Sort Key: "123456789012345678901234567890123456789012345678901234567890123".id
5325- -> Seq Scan on t1 "123456789012345678901234567890123456789012345678901234567890123"
5326- -> Sort
5327- Sort Key: t3.id
5328- -> Seq Scan on t3
5329-(11 rows)
5330-
5331-SET "123456789012345678901234567890123456789012345678901234567890123" TO 1;
5332-ERROR: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5333-SET "1234567890123456789012345678901234567890123456789012345678901234" TO 1;
5334-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
5335-ERROR: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
5336-SET cursor_tuple_fraction TO 1234567890123456789012345678901234567890123456789012345678901234;
5337-ERROR: 1.23457e+63 is outside the valid range for parameter "cursor_tuple_fraction" (0 .. 1)
5338--- multi error
5339-/*+ Set(enable_seqscan 100)Set(seq_page_cost on)*/
5340-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
5341-INFO: parameter "enable_seqscan" requires a Boolean value
5342-INFO: parameter "seq_page_cost" requires a numeric value
5343-LOG: pg_hint_plan:
5344-used hint:
5345-not used hint:
5346-duplication hint:
5347-error hint:
5348-Set(enable_seqscan 100)
5349-Set(seq_page_cost on)
5350-
5351- QUERY PLAN
5352---------------------------------------
5353- Merge Join
5354- Merge Cond: (t1.id = t2.id)
5355- -> Index Scan using t1_pkey on t1
5356- -> Index Scan using t2_pkey on t2
5357-(4 rows)
5358-
5359--- debug log of candidate index to use IndexScan
5360-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5361- QUERY PLAN
5362-----------------------------------------------------------------------------------------
5363- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
5364- Index Cond: (id = 1)
5365-(2 rows)
5366-
5367-/*+IndexScan(t5 t5_id2)*/
5368-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5369-LOG: available indexes for IndexScan(t5): t5_id2
5370-LOG: pg_hint_plan:
5371-used hint:
5372-IndexScan(t5 t5_id2)
5373-not used hint:
5374-duplication hint:
5375-error hint:
5376-
5377- QUERY PLAN
5378--------------------------------
5379- Index Scan using t5_id2 on t5
5380- Index Cond: (id = 1)
5381-(2 rows)
5382-
5383-/*+IndexScan(t5 no_exist)*/
5384-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5385-LOG: available indexes for IndexScan(t5):
5386-LOG: pg_hint_plan:
5387-used hint:
5388-IndexScan(t5 no_exist)
5389-not used hint:
5390-duplication hint:
5391-error hint:
5392-
5393- QUERY PLAN
5394---------------------
5395- Seq Scan on t5
5396- Filter: (id = 1)
5397-(2 rows)
5398-
5399-/*+IndexScan(t5 t5_id1 t5_id2)*/
5400-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5401-LOG: available indexes for IndexScan(t5): t5_id2 t5_id1
5402-LOG: pg_hint_plan:
5403-used hint:
5404-IndexScan(t5 t5_id1 t5_id2)
5405-not used hint:
5406-duplication hint:
5407-error hint:
5408-
5409- QUERY PLAN
5410--------------------------------
5411- Index Scan using t5_id2 on t5
5412- Index Cond: (id = 1)
5413-(2 rows)
5414-
5415-/*+IndexScan(t5 no_exist t5_id2)*/
5416-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5417-LOG: available indexes for IndexScan(t5): t5_id2
5418-LOG: pg_hint_plan:
5419-used hint:
5420-IndexScan(t5 no_exist t5_id2)
5421-not used hint:
5422-duplication hint:
5423-error hint:
5424-
5425- QUERY PLAN
5426--------------------------------
5427- Index Scan using t5_id2 on t5
5428- Index Cond: (id = 1)
5429-(2 rows)
5430-
5431-/*+IndexScan(t5 no_exist5 no_exist2)*/
5432-EXPLAIN (COSTS false) SELECT * FROM t5 WHERE t5.id = 1;
5433-LOG: available indexes for IndexScan(t5):
5434-LOG: pg_hint_plan:
5435-used hint:
5436-IndexScan(t5 no_exist5 no_exist2)
5437-not used hint:
5438-duplication hint:
5439-error hint:
5440-
5441- QUERY PLAN
5442---------------------
5443- Seq Scan on t5
5444- Filter: (id = 1)
5445-(2 rows)
5446-
5447--- outer inner
5448-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5449- QUERY PLAN
5450---------------------------------------------------------
5451- Hash Join
5452- Hash Cond: (t3.val = t2.val)
5453- -> Seq Scan on t3
5454- -> Hash
5455- -> Hash Join
5456- Hash Cond: (t2.id = t1.id)
5457- -> Seq Scan on t2
5458- -> Hash
5459- -> Index Scan using t1_pkey on t1
5460- Index Cond: (id < 10)
5461-(10 rows)
5462-
5463-/*+Leading((t1))*/
5464-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5465-INFO: hint syntax error at or near "Leading((t1))"
5466-DETAIL: Leading hint requires two sets of relations when parentheses nests.
5467-LOG: pg_hint_plan:
5468-used hint:
5469-not used hint:
5470-duplication hint:
5471-error hint:
5472-Leading((t1))
5473-
5474- QUERY PLAN
5475---------------------------------------------------------
5476- Hash Join
5477- Hash Cond: (t3.val = t2.val)
5478- -> Seq Scan on t3
5479- -> Hash
5480- -> Hash Join
5481- Hash Cond: (t2.id = t1.id)
5482- -> Seq Scan on t2
5483- -> Hash
5484- -> Index Scan using t1_pkey on t1
5485- Index Cond: (id < 10)
5486-(10 rows)
5487-
5488-/*+Leading((t1 t2))*/
5489-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5490-LOG: pg_hint_plan:
5491-used hint:
5492-Leading((t1 t2))
5493-not used hint:
5494-duplication hint:
5495-error hint:
5496-
5497- QUERY PLAN
5498---------------------------------------------
5499- Nested Loop
5500- Join Filter: (t2.val = t3.val)
5501- -> Hash Join
5502- Hash Cond: (t1.id = t2.id)
5503- -> Index Scan using t1_pkey on t1
5504- Index Cond: (id < 10)
5505- -> Hash
5506- -> Seq Scan on t2
5507- -> Seq Scan on t3
5508-(9 rows)
5509-
5510-/*+Leading((t1 t2 t3))*/
5511-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5512-INFO: hint syntax error at or near "Leading((t1 t2 t3))"
5513-DETAIL: Leading hint requires two sets of relations when parentheses nests.
5514-LOG: pg_hint_plan:
5515-used hint:
5516-not used hint:
5517-duplication hint:
5518-error hint:
5519-Leading((t1 t2 t3))
5520-
5521- QUERY PLAN
5522---------------------------------------------------------
5523- Hash Join
5524- Hash Cond: (t3.val = t2.val)
5525- -> Seq Scan on t3
5526- -> Hash
5527- -> Hash Join
5528- Hash Cond: (t2.id = t1.id)
5529- -> Seq Scan on t2
5530- -> Hash
5531- -> Index Scan using t1_pkey on t1
5532- Index Cond: (id < 10)
5533-(10 rows)
5534-
5535-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.id < 10;
5536- QUERY PLAN
5537---------------------------------------------
5538- Hash Join
5539- Hash Cond: (t2.id = t1.id)
5540- -> Seq Scan on t2
5541- -> Hash
5542- -> Index Scan using t1_pkey on t1
5543- Index Cond: (id < 10)
5544-(6 rows)
5545-
5546-/*+Leading((t1 t2))*/
5547-EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id AND t1.id < 10;
5548-LOG: pg_hint_plan:
5549-used hint:
5550-Leading((t1 t2))
5551-not used hint:
5552-duplication hint:
5553-error hint:
5554-
5555- QUERY PLAN
5556---------------------------------------
5557- Hash Join
5558- Hash Cond: (t1.id = t2.id)
5559- -> Index Scan using t1_pkey on t1
5560- Index Cond: (id < 10)
5561- -> Hash
5562- -> Seq Scan on t2
5563-(6 rows)
5564-
5565-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5566- QUERY PLAN
5567---------------------------------------------------------
5568- Hash Join
5569- Hash Cond: (t3.val = t2.val)
5570- -> Seq Scan on t3
5571- -> Hash
5572- -> Hash Join
5573- Hash Cond: (t2.id = t1.id)
5574- -> Seq Scan on t2
5575- -> Hash
5576- -> Index Scan using t1_pkey on t1
5577- Index Cond: (id < 10)
5578-(10 rows)
5579-
5580-/*+Leading(((t1 t2) t3))*/
5581-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5582-LOG: pg_hint_plan:
5583-used hint:
5584-Leading(((t1 t2) t3))
5585-not used hint:
5586-duplication hint:
5587-error hint:
5588-
5589- QUERY PLAN
5590---------------------------------------------
5591- Nested Loop
5592- Join Filter: (t2.val = t3.val)
5593- -> Hash Join
5594- Hash Cond: (t1.id = t2.id)
5595- -> Index Scan using t1_pkey on t1
5596- Index Cond: (id < 10)
5597- -> Hash
5598- -> Seq Scan on t2
5599- -> Seq Scan on t3
5600-(9 rows)
5601-
5602-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5603- QUERY PLAN
5604---------------------------------------------------------
5605- Nested Loop
5606- -> Merge Join
5607- Merge Cond: (t3.id = t4.id)
5608- -> Nested Loop
5609- Join Filter: (t1.val = t3.val)
5610- -> Index Scan using t3_pkey on t3
5611- -> Materialize
5612- -> Index Scan using t1_pkey on t1
5613- Index Cond: (id < 10)
5614- -> Sort
5615- Sort Key: t4.id
5616- -> Seq Scan on t4
5617- -> Index Scan using t2_pkey on t2
5618- Index Cond: (id = t1.id)
5619-(14 rows)
5620-
5621-/*+Leading((((t1 t2) t3) t4))*/
5622-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5623-LOG: pg_hint_plan:
5624-used hint:
5625-Leading((((t1 t2) t3) t4))
5626-not used hint:
5627-duplication hint:
5628-error hint:
5629-
5630- QUERY PLAN
5631---------------------------------------------------
5632- Nested Loop
5633- -> Nested Loop
5634- Join Filter: (t1.val = t3.val)
5635- -> Hash Join
5636- Hash Cond: (t1.id = t2.id)
5637- -> Index Scan using t1_pkey on t1
5638- Index Cond: (id < 10)
5639- -> Hash
5640- -> Seq Scan on t2
5641- -> Seq Scan on t3
5642- -> Index Scan using t4_pkey on t4
5643- Index Cond: (id = t3.id)
5644-(12 rows)
5645-
5646-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5647- QUERY PLAN
5648---------------------------------------------------------
5649- Hash Join
5650- Hash Cond: (t3.val = t2.val)
5651- -> Seq Scan on t3
5652- -> Hash
5653- -> Hash Join
5654- Hash Cond: (t2.id = t1.id)
5655- -> Seq Scan on t2
5656- -> Hash
5657- -> Index Scan using t1_pkey on t1
5658- Index Cond: (id < 10)
5659-(10 rows)
5660-
5661-/*+Leading(((t1 t2) t3))*/
5662-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5663-LOG: pg_hint_plan:
5664-used hint:
5665-Leading(((t1 t2) t3))
5666-not used hint:
5667-duplication hint:
5668-error hint:
5669-
5670- QUERY PLAN
5671---------------------------------------------
5672- Nested Loop
5673- Join Filter: (t2.val = t3.val)
5674- -> Hash Join
5675- Hash Cond: (t1.id = t2.id)
5676- -> Index Scan using t1_pkey on t1
5677- Index Cond: (id < 10)
5678- -> Hash
5679- -> Seq Scan on t2
5680- -> Seq Scan on t3
5681-(9 rows)
5682-
5683-/*+Leading((t1 (t2 t3)))*/
5684-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5685-LOG: pg_hint_plan:
5686-used hint:
5687-Leading((t1 (t2 t3)))
5688-not used hint:
5689-duplication hint:
5690-error hint:
5691-
5692- QUERY PLAN
5693---------------------------------------------
5694- Hash Join
5695- Hash Cond: (t1.id = t2.id)
5696- -> Index Scan using t1_pkey on t1
5697- Index Cond: (id < 10)
5698- -> Hash
5699- -> Hash Join
5700- Hash Cond: (t2.val = t3.val)
5701- -> Seq Scan on t2
5702- -> Hash
5703- -> Seq Scan on t3
5704-(10 rows)
5705-
5706-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5707- QUERY PLAN
5708---------------------------------------------------------
5709- Nested Loop
5710- -> Merge Join
5711- Merge Cond: (t3.id = t4.id)
5712- -> Nested Loop
5713- Join Filter: (t1.val = t3.val)
5714- -> Index Scan using t3_pkey on t3
5715- -> Materialize
5716- -> Index Scan using t1_pkey on t1
5717- Index Cond: (id < 10)
5718- -> Sort
5719- Sort Key: t4.id
5720- -> Seq Scan on t4
5721- -> Index Scan using t2_pkey on t2
5722- Index Cond: (id = t1.id)
5723-(14 rows)
5724-
5725-/*+Leading(((t1 t2) (t3 t4)))*/
5726-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5727-LOG: pg_hint_plan:
5728-used hint:
5729-Leading(((t1 t2) (t3 t4)))
5730-not used hint:
5731-duplication hint:
5732-error hint:
5733-
5734- QUERY PLAN
5735---------------------------------------------
5736- Nested Loop
5737- Join Filter: (t1.val = t3.val)
5738- -> Hash Join
5739- Hash Cond: (t1.id = t2.id)
5740- -> Index Scan using t1_pkey on t1
5741- Index Cond: (id < 10)
5742- -> Hash
5743- -> Seq Scan on t2
5744- -> Merge Join
5745- Merge Cond: (t3.id = t4.id)
5746- -> Index Scan using t3_pkey on t3
5747- -> Sort
5748- Sort Key: t4.id
5749- -> Seq Scan on t4
5750-(14 rows)
5751-
5752-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5753- QUERY PLAN
5754----------------------------------------------------------------
5755- Hash Join
5756- Hash Cond: (t2.val = t3.val)
5757- InitPlan 1 (returns $1)
5758- -> Limit
5759- -> Sort
5760- Sort Key: t1_2.id
5761- -> Nested Loop
5762- -> Index Scan using t2_val on t2 t2_2
5763- Index Cond: (val > 100)
5764- -> Index Scan using t1_pkey on t1 t1_2
5765- Index Cond: (id = t2_2.id)
5766- -> Merge Join
5767- Merge Cond: (t1.id = t2.id)
5768- -> Index Scan using t1_pkey on t1
5769- Index Cond: (id < $1)
5770- -> Index Scan using t2_pkey on t2
5771- -> Hash
5772- -> Seq Scan on t3
5773-(18 rows)
5774-
5775-/*+Leading(((t1 t2) t3)) Leading(((t3 t1) t2))*/
5776-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t1.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5777-INFO: hint syntax error at or near "Leading(((t1 t2) t3)) Leading(((t3 t1) t2))"
5778-DETAIL: Conflict leading hint.
5779-LOG: pg_hint_plan:
5780-used hint:
5781-Leading(((t3 t1) t2))
5782-not used hint:
5783-duplication hint:
5784-Leading(((t1 t2) t3))
5785-error hint:
5786-
5787- QUERY PLAN
5788----------------------------------------------------------------
5789- Hash Join
5790- Hash Cond: (t1.id = t2.id)
5791- InitPlan 1 (returns $1)
5792- -> Limit
5793- -> Sort
5794- Sort Key: t1_2.id
5795- -> Nested Loop
5796- -> Index Scan using t2_val on t2 t2_2
5797- Index Cond: (val > 100)
5798- -> Index Scan using t1_pkey on t1 t1_2
5799- Index Cond: (id = t2_2.id)
5800- -> Hash Join
5801- Hash Cond: (t3.val = t1.val)
5802- -> Seq Scan on t3
5803- -> Hash
5804- -> Index Scan using t1_pkey on t1
5805- Index Cond: (id < $1)
5806- -> Hash
5807- -> Seq Scan on t2
5808-(19 rows)
5809-
5810-/*+Leading(((t1 t2) t3)) Leading((t1_2 t2_2))*/
5811-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5812-LOG: pg_hint_plan:
5813-used hint:
5814-Leading(((t1 t2) t3))
5815-Leading((t1_2 t2_2))
5816-not used hint:
5817-duplication hint:
5818-error hint:
5819-
5820- QUERY PLAN
5821---------------------------------------------------------------
5822- Hash Join
5823- Hash Cond: (t2.val = t3.val)
5824- InitPlan 1 (returns $0)
5825- -> Limit
5826- -> Merge Join
5827- Merge Cond: (t1_2.id = t2_2.id)
5828- -> Index Scan using t1_pkey on t1 t1_2
5829- -> Sort
5830- Sort Key: t2_2.id
5831- -> Index Scan using t2_val on t2 t2_2
5832- Index Cond: (val > 100)
5833- -> Merge Join
5834- Merge Cond: (t1.id = t2.id)
5835- -> Index Scan using t1_pkey on t1
5836- Index Cond: (id < $0)
5837- -> Index Scan using t2_pkey on t2
5838- -> Hash
5839- -> Seq Scan on t3
5840-(18 rows)
5841-
5842-/*+Leading(((((t1 t2) t3) t1_2) t2_2))*/
5843-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < ( SELECT t1_2.id FROM t1 t1_2, t2 t2_2 WHERE t1_2.id = t2_2.id AND t2_2.val > 100 ORDER BY t1_2.id LIMIT 1);
5844-LOG: pg_hint_plan:
5845-used hint:
5846-not used hint:
5847-Leading(((((t1 t2) t3) t1_2) t2_2))
5848-duplication hint:
5849-error hint:
5850-
5851- QUERY PLAN
5852----------------------------------------------------------------
5853- Hash Join
5854- Hash Cond: (t2.val = t3.val)
5855- InitPlan 1 (returns $1)
5856- -> Limit
5857- -> Sort
5858- Sort Key: t1_2.id
5859- -> Nested Loop
5860- -> Index Scan using t2_val on t2 t2_2
5861- Index Cond: (val > 100)
5862- -> Index Scan using t1_pkey on t1 t1_2
5863- Index Cond: (id = t2_2.id)
5864- -> Merge Join
5865- Merge Cond: (t1.id = t2.id)
5866- -> Index Scan using t1_pkey on t1
5867- Index Cond: (id < $1)
5868- -> Index Scan using t2_pkey on t2
5869- -> Hash
5870- -> Seq Scan on t3
5871-(18 rows)
5872-
5873--- Specified outer/inner leading hint and join method hint at the same time
5874-/*+Leading(((t1 t2) t3))*/
5875-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5876-LOG: pg_hint_plan:
5877-used hint:
5878-Leading(((t1 t2) t3))
5879-not used hint:
5880-duplication hint:
5881-error hint:
5882-
5883- QUERY PLAN
5884---------------------------------------------
5885- Nested Loop
5886- Join Filter: (t2.val = t3.val)
5887- -> Hash Join
5888- Hash Cond: (t1.id = t2.id)
5889- -> Index Scan using t1_pkey on t1
5890- Index Cond: (id < 10)
5891- -> Hash
5892- -> Seq Scan on t2
5893- -> Seq Scan on t3
5894-(9 rows)
5895-
5896-/*+Leading(((t1 t2) t3)) MergeJoin(t1 t2)*/
5897-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5898-LOG: pg_hint_plan:
5899-used hint:
5900-MergeJoin(t1 t2)
5901-Leading(((t1 t2) t3))
5902-not used hint:
5903-duplication hint:
5904-error hint:
5905-
5906- QUERY PLAN
5907---------------------------------------------
5908- Nested Loop
5909- Join Filter: (t2.val = t3.val)
5910- -> Merge Join
5911- Merge Cond: (t1.id = t2.id)
5912- -> Index Scan using t1_pkey on t1
5913- Index Cond: (id < 10)
5914- -> Index Scan using t2_pkey on t2
5915- -> Seq Scan on t3
5916-(8 rows)
5917-
5918-/*+Leading(((t1 t2) t3)) MergeJoin(t1 t2 t3)*/
5919-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5920-LOG: pg_hint_plan:
5921-used hint:
5922-MergeJoin(t1 t2 t3)
5923-Leading(((t1 t2) t3))
5924-not used hint:
5925-duplication hint:
5926-error hint:
5927-
5928- QUERY PLAN
5929---------------------------------------------------
5930- Merge Join
5931- Merge Cond: (t2.val = t3.val)
5932- -> Sort
5933- Sort Key: t2.val
5934- -> Hash Join
5935- Hash Cond: (t1.id = t2.id)
5936- -> Index Scan using t1_pkey on t1
5937- Index Cond: (id < 10)
5938- -> Hash
5939- -> Seq Scan on t2
5940- -> Sort
5941- Sort Key: t3.val
5942- -> Seq Scan on t3
5943-(13 rows)
5944-
5945-/*+Leading(((t1 t2) t3)) MergeJoin(t1 t3)*/
5946-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
5947-LOG: pg_hint_plan:
5948-used hint:
5949-Leading(((t1 t2) t3))
5950-not used hint:
5951-MergeJoin(t1 t3)
5952-duplication hint:
5953-error hint:
5954-
5955- QUERY PLAN
5956---------------------------------------------
5957- Nested Loop
5958- Join Filter: (t2.val = t3.val)
5959- -> Hash Join
5960- Hash Cond: (t1.id = t2.id)
5961- -> Index Scan using t1_pkey on t1
5962- Index Cond: (id < 10)
5963- -> Hash
5964- -> Seq Scan on t2
5965- -> Seq Scan on t3
5966-(9 rows)
5967-
5968-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5969- QUERY PLAN
5970---------------------------------------------------------
5971- Nested Loop
5972- -> Merge Join
5973- Merge Cond: (t3.id = t4.id)
5974- -> Nested Loop
5975- Join Filter: (t1.val = t3.val)
5976- -> Index Scan using t3_pkey on t3
5977- -> Materialize
5978- -> Index Scan using t1_pkey on t1
5979- Index Cond: (id < 10)
5980- -> Sort
5981- Sort Key: t4.id
5982- -> Seq Scan on t4
5983- -> Index Scan using t2_pkey on t2
5984- Index Cond: (id = t1.id)
5985-(14 rows)
5986-
5987-/*+Leading(((t1 t2) t3)) MergeJoin(t3 t4)*/
5988-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
5989-LOG: pg_hint_plan:
5990-used hint:
5991-Leading(((t1 t2) t3))
5992-not used hint:
5993-MergeJoin(t3 t4)
5994-duplication hint:
5995-error hint:
5996-
5997- QUERY PLAN
5998---------------------------------------------------
5999- Nested Loop
6000- -> Nested Loop
6001- Join Filter: (t1.val = t3.val)
6002- -> Hash Join
6003- Hash Cond: (t1.id = t2.id)
6004- -> Index Scan using t1_pkey on t1
6005- Index Cond: (id < 10)
6006- -> Hash
6007- -> Seq Scan on t2
6008- -> Seq Scan on t3
6009- -> Index Scan using t4_pkey on t4
6010- Index Cond: (id = t3.id)
6011-(12 rows)
6012-
6013-/*+Leading(((t1 t2) t3)) MergeJoin(t1 t2 t3 t4)*/
6014-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4 WHERE t1.id = t2.id AND t3.id = t4.id AND t1.val = t3.val AND t1.id < 10;
6015-LOG: pg_hint_plan:
6016-used hint:
6017-MergeJoin(t1 t2 t3 t4)
6018-Leading(((t1 t2) t3))
6019-not used hint:
6020-duplication hint:
6021-error hint:
6022-
6023- QUERY PLAN
6024---------------------------------------------------------
6025- Merge Join
6026- Merge Cond: (t3.id = t4.id)
6027- -> Sort
6028- Sort Key: t3.id
6029- -> Nested Loop
6030- Join Filter: (t1.val = t3.val)
6031- -> Hash Join
6032- Hash Cond: (t1.id = t2.id)
6033- -> Index Scan using t1_pkey on t1
6034- Index Cond: (id < 10)
6035- -> Hash
6036- -> Seq Scan on t2
6037- -> Seq Scan on t3
6038- -> Sort
6039- Sort Key: t4.id
6040- -> Seq Scan on t4
6041-(16 rows)
6042-
6043-/*+ Leading ( ( t1 ( t2 t3 ) ) ) */
6044-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6045-LOG: pg_hint_plan:
6046-used hint:
6047-Leading((t1 (t2 t3)))
6048-not used hint:
6049-duplication hint:
6050-error hint:
6051-
6052- QUERY PLAN
6053---------------------------------------------
6054- Hash Join
6055- Hash Cond: (t1.id = t2.id)
6056- -> Index Scan using t1_pkey on t1
6057- Index Cond: (id < 10)
6058- -> Hash
6059- -> Hash Join
6060- Hash Cond: (t2.val = t3.val)
6061- -> Seq Scan on t2
6062- -> Hash
6063- -> Seq Scan on t3
6064-(10 rows)
6065-
6066-/*+Leading((t1(t2 t3)))*/
6067-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6068-LOG: pg_hint_plan:
6069-used hint:
6070-Leading((t1 (t2 t3)))
6071-not used hint:
6072-duplication hint:
6073-error hint:
6074-
6075- QUERY PLAN
6076---------------------------------------------
6077- Hash Join
6078- Hash Cond: (t1.id = t2.id)
6079- -> Index Scan using t1_pkey on t1
6080- Index Cond: (id < 10)
6081- -> Hash
6082- -> Hash Join
6083- Hash Cond: (t2.val = t3.val)
6084- -> Seq Scan on t2
6085- -> Hash
6086- -> Seq Scan on t3
6087-(10 rows)
6088-
6089-/*+Leading(("t1(t2" "t3)"))*/
6090-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6091-LOG: pg_hint_plan:
6092-used hint:
6093-not used hint:
6094-Leading(("t1(t2" "t3)"))
6095-duplication hint:
6096-error hint:
6097-
6098- QUERY PLAN
6099---------------------------------------------------------
6100- Hash Join
6101- Hash Cond: (t3.val = t2.val)
6102- -> Seq Scan on t3
6103- -> Hash
6104- -> Hash Join
6105- Hash Cond: (t2.id = t1.id)
6106- -> Seq Scan on t2
6107- -> Hash
6108- -> Index Scan using t1_pkey on t1
6109- Index Cond: (id < 10)
6110-(10 rows)
6111-
6112-/*+ Leading ( ( ( t1 t2 ) t3 ) ) */
6113-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6114-LOG: pg_hint_plan:
6115-used hint:
6116-Leading(((t1 t2) t3))
6117-not used hint:
6118-duplication hint:
6119-error hint:
6120-
6121- QUERY PLAN
6122---------------------------------------------
6123- Nested Loop
6124- Join Filter: (t2.val = t3.val)
6125- -> Hash Join
6126- Hash Cond: (t1.id = t2.id)
6127- -> Index Scan using t1_pkey on t1
6128- Index Cond: (id < 10)
6129- -> Hash
6130- -> Seq Scan on t2
6131- -> Seq Scan on t3
6132-(9 rows)
6133-
6134-/*+Leading(((t1 t2)t3))*/
6135-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6136-LOG: pg_hint_plan:
6137-used hint:
6138-Leading(((t1 t2) t3))
6139-not used hint:
6140-duplication hint:
6141-error hint:
6142-
6143- QUERY PLAN
6144---------------------------------------------
6145- Nested Loop
6146- Join Filter: (t2.val = t3.val)
6147- -> Hash Join
6148- Hash Cond: (t1.id = t2.id)
6149- -> Index Scan using t1_pkey on t1
6150- Index Cond: (id < 10)
6151- -> Hash
6152- -> Seq Scan on t2
6153- -> Seq Scan on t3
6154-(9 rows)
6155-
6156-/*+Leading(("(t1" "t2)t3"))*/
6157-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3 WHERE t1.id = t2.id AND t2.val = t3.val AND t1.id < 10;
6158-LOG: pg_hint_plan:
6159-used hint:
6160-not used hint:
6161-Leading(("(t1" "t2)t3"))
6162-duplication hint:
6163-error hint:
6164-
6165- QUERY PLAN
6166---------------------------------------------------------
6167- Hash Join
6168- Hash Cond: (t3.val = t2.val)
6169- -> Seq Scan on t3
6170- -> Hash
6171- -> Hash Join
6172- Hash Cond: (t2.id = t1.id)
6173- -> Seq Scan on t2
6174- -> Hash
6175- -> Index Scan using t1_pkey on t1
6176- Index Cond: (id < 10)
6177-(10 rows)
6178-
6179-/*+Leading((t1(t2(t3(t4 t5)))))*/
6180-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6181-LOG: pg_hint_plan:
6182-used hint:
6183-Leading((t1 (t2 (t3 (t4 t5)))))
6184-not used hint:
6185-duplication hint:
6186-error hint:
6187-
6188- QUERY PLAN
6189-----------------------------------------------------------------------------------------------------------------------------------
6190- Merge Join
6191- Merge Cond: (t1.id = t2.id)
6192- -> Index Scan using t1_pkey on t1
6193- -> Materialize
6194- -> Merge Join
6195- Merge Cond: (t2.id = t3.id)
6196- -> Index Scan using t2_pkey on t2
6197- -> Materialize
6198- -> Merge Join
6199- Merge Cond: (t3.id = t4.id)
6200- -> Index Scan using t3_pkey on t3
6201- -> Materialize
6202- -> Merge Join
6203- Merge Cond: (t4.id = t5.id)
6204- -> Index Scan using t4_pkey on t4
6205- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6206-(16 rows)
6207-
6208-/*+Leading((t5(t4(t3(t2 t1)))))*/
6209-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6210-LOG: pg_hint_plan:
6211-used hint:
6212-Leading((t5 (t4 (t3 (t2 t1)))))
6213-not used hint:
6214-duplication hint:
6215-error hint:
6216-
6217- QUERY PLAN
6218---------------------------------------------------------------------------
6219- Hash Join
6220- Hash Cond: (t5.id = t1.id)
6221- -> Seq Scan on t5
6222- -> Hash
6223- -> Merge Join
6224- Merge Cond: (t4.id = t1.id)
6225- -> Sort
6226- Sort Key: t4.id
6227- -> Seq Scan on t4
6228- -> Materialize
6229- -> Merge Join
6230- Merge Cond: (t3.id = t1.id)
6231- -> Sort
6232- Sort Key: t3.id
6233- -> Seq Scan on t3
6234- -> Materialize
6235- -> Merge Join
6236- Merge Cond: (t2.id = t1.id)
6237- -> Index Scan using t2_pkey on t2
6238- -> Index Scan using t1_pkey on t1
6239-(20 rows)
6240-
6241-/*+Leading(((((t1 t2)t3)t4)t5))*/
6242-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6243-LOG: pg_hint_plan:
6244-used hint:
6245-Leading(((((t1 t2) t3) t4) t5))
6246-not used hint:
6247-duplication hint:
6248-error hint:
6249-
6250- QUERY PLAN
6251-----------------------------------------------------------------------------------------------
6252- Nested Loop
6253- -> Merge Join
6254- Merge Cond: (t1.id = t4.id)
6255- -> Merge Join
6256- Merge Cond: (t1.id = t3.id)
6257- -> Merge Join
6258- Merge Cond: (t1.id = t2.id)
6259- -> Index Scan using t1_pkey on t1
6260- -> Index Scan using t2_pkey on t2
6261- -> Index Scan using t3_pkey on t3
6262- -> Sort
6263- Sort Key: t4.id
6264- -> Seq Scan on t4
6265- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6266- Index Cond: (id = t1.id)
6267-(15 rows)
6268-
6269-/*+Leading(((((t5 t4)t3)t2)t1))*/
6270-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6271-LOG: pg_hint_plan:
6272-used hint:
6273-Leading(((((t5 t4) t3) t2) t1))
6274-not used hint:
6275-duplication hint:
6276-error hint:
6277-
6278- QUERY PLAN
6279-----------------------------------------------------------------------------------------------------------------
6280- Nested Loop
6281- -> Merge Join
6282- Merge Cond: (t3.id = t2.id)
6283- -> Merge Join
6284- Merge Cond: (t4.id = t3.id)
6285- -> Merge Join
6286- Merge Cond: (t5.id = t4.id)
6287- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6288- -> Sort
6289- Sort Key: t4.id
6290- -> Seq Scan on t4
6291- -> Index Scan using t3_pkey on t3
6292- -> Index Scan using t2_pkey on t2
6293- -> Index Scan using t1_pkey on t1
6294- Index Cond: (id = t2.id)
6295-(15 rows)
6296-
6297-/*+Leading(((t1 t2)(t3(t4 t5))))*/
6298-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6299-LOG: pg_hint_plan:
6300-used hint:
6301-Leading(((t1 t2) (t3 (t4 t5))))
6302-not used hint:
6303-duplication hint:
6304-error hint:
6305-
6306- QUERY PLAN
6307-----------------------------------------------------------------------------------------------------------------------
6308- Merge Join
6309- Merge Cond: (t1.id = t3.id)
6310- -> Merge Join
6311- Merge Cond: (t1.id = t2.id)
6312- -> Index Scan using t1_pkey on t1
6313- -> Index Scan using t2_pkey on t2
6314- -> Materialize
6315- -> Merge Join
6316- Merge Cond: (t3.id = t4.id)
6317- -> Index Scan using t3_pkey on t3
6318- -> Materialize
6319- -> Merge Join
6320- Merge Cond: (t4.id = t5.id)
6321- -> Index Scan using t4_pkey on t4
6322- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6323-(15 rows)
6324-
6325-/*+Leading(((t5 t4)(t3(t2 t1))))*/
6326-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6327-LOG: pg_hint_plan:
6328-used hint:
6329-Leading(((t5 t4) (t3 (t2 t1))))
6330-not used hint:
6331-duplication hint:
6332-error hint:
6333-
6334- QUERY PLAN
6335-----------------------------------------------------------------------------------------------------
6336- Merge Join
6337- Merge Cond: (t4.id = t1.id)
6338- -> Merge Join
6339- Merge Cond: (t5.id = t4.id)
6340- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6341- -> Sort
6342- Sort Key: t4.id
6343- -> Seq Scan on t4
6344- -> Materialize
6345- -> Merge Join
6346- Merge Cond: (t3.id = t1.id)
6347- -> Index Scan using t3_pkey on t3
6348- -> Materialize
6349- -> Merge Join
6350- Merge Cond: (t2.id = t1.id)
6351- -> Index Scan using t2_pkey on t2
6352- -> Index Scan using t1_pkey on t1
6353-(17 rows)
6354-
6355-/*+Leading((((t1 t2)t3)(t4 t5)))*/
6356-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6357-LOG: pg_hint_plan:
6358-used hint:
6359-Leading((((t1 t2) t3) (t4 t5)))
6360-not used hint:
6361-duplication hint:
6362-error hint:
6363-
6364- QUERY PLAN
6365-----------------------------------------------------------------------------------------------------------
6366- Merge Join
6367- Merge Cond: (t1.id = t4.id)
6368- -> Merge Join
6369- Merge Cond: (t1.id = t3.id)
6370- -> Merge Join
6371- Merge Cond: (t1.id = t2.id)
6372- -> Index Scan using t1_pkey on t1
6373- -> Index Scan using t2_pkey on t2
6374- -> Index Scan using t3_pkey on t3
6375- -> Materialize
6376- -> Merge Join
6377- Merge Cond: (t4.id = t5.id)
6378- -> Index Scan using t4_pkey on t4
6379- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6380-(14 rows)
6381-
6382-/*+Leading((((t5 t4)t3)(t2 t1)))*/
6383-EXPLAIN (COSTS false) SELECT * FROM t1, t2, t3, t4, t5 WHERE t1.id = t2.id AND t1.id = t3.id AND t1.id = t4.id AND t1.id = t5.id;
6384-LOG: pg_hint_plan:
6385-used hint:
6386-Leading((((t5 t4) t3) (t2 t1)))
6387-not used hint:
6388-duplication hint:
6389-error hint:
6390-
6391- QUERY PLAN
6392-----------------------------------------------------------------------------------------------------------
6393- Merge Join
6394- Merge Cond: (t3.id = t1.id)
6395- -> Merge Join
6396- Merge Cond: (t4.id = t3.id)
6397- -> Merge Join
6398- Merge Cond: (t5.id = t4.id)
6399- -> Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
6400- -> Sort
6401- Sort Key: t4.id
6402- -> Seq Scan on t4
6403- -> Index Scan using t3_pkey on t3
6404- -> Materialize
6405- -> Merge Join
6406- Merge Cond: (t2.id = t1.id)
6407- -> Index Scan using t2_pkey on t2
6408- -> Index Scan using t1_pkey on t1
6409-(16 rows)
6410-
6411--- inherite table test to specify the index's name
6412-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6413- QUERY PLAN
6414------------------------------------------------------------------------------
6415- Result
6416- -> Append
6417- -> Seq Scan on p2
6418- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6419- -> Seq Scan on p2_c1 p2
6420- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6421- -> Tid Scan on p2_c1_c1 p2
6422- TID Cond: (ctid = '(1,1)'::tid)
6423- Filter: ((id >= 50) AND (id <= 51))
6424- -> Tid Scan on p2_c1_c2 p2
6425- TID Cond: (ctid = '(1,1)'::tid)
6426- Filter: ((id >= 50) AND (id <= 51))
6427-(12 rows)
6428-
6429-/*+IndexScan(p2 p2_pkey)*/
6430-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6431-LOG: available indexes for IndexScan(p2): p2_pkey
6432-LOG: available indexes for IndexScan(p2_c1): p2_c1_pkey
6433-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6434-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6435-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6436-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6437-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6438-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6439-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6440-LOG: pg_hint_plan:
6441-used hint:
6442-IndexScan(p2 p2_pkey)
6443-not used hint:
6444-duplication hint:
6445-error hint:
6446-
6447- QUERY PLAN
6448------------------------------------------------------------
6449- Result
6450- -> Append
6451- -> Index Scan using p2_pkey on p2
6452- Index Cond: ((id >= 50) AND (id <= 51))
6453- Filter: (ctid = '(1,1)'::tid)
6454- -> Index Scan using p2_c1_pkey on p2_c1 p2
6455- Index Cond: ((id >= 50) AND (id <= 51))
6456- Filter: (ctid = '(1,1)'::tid)
6457- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6458- Index Cond: ((id >= 50) AND (id <= 51))
6459- Filter: (ctid = '(1,1)'::tid)
6460- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6461- Index Cond: ((id >= 50) AND (id <= 51))
6462- Filter: (ctid = '(1,1)'::tid)
6463-(14 rows)
6464-
6465-/*+IndexScan(p2 p2_id_val_idx)*/
6466-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6467-LOG: available indexes for IndexScan(p2): p2_id_val_idx
6468-LOG: available indexes for IndexScan(p2_c1): p2_c1_id_val_idx
6469-LOG: available indexes for IndexScan(p2_c2): p2_c2_id_val_idx
6470-LOG: available indexes for IndexScan(p2_c3): p2_c3_id_val_idx
6471-LOG: available indexes for IndexScan(p2_c4): p2_c4_id_val_idx
6472-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_id_val_idx
6473-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_id_val_idx
6474-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_id_val_idx
6475-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_id_val_idx
6476-LOG: pg_hint_plan:
6477-used hint:
6478-IndexScan(p2 p2_id_val_idx)
6479-not used hint:
6480-duplication hint:
6481-error hint:
6482-
6483- QUERY PLAN
6484------------------------------------------------------------------
6485- Result
6486- -> Append
6487- -> Index Scan using p2_id_val_idx on p2
6488- Index Cond: ((id >= 50) AND (id <= 51))
6489- Filter: (ctid = '(1,1)'::tid)
6490- -> Index Scan using p2_c1_id_val_idx on p2_c1 p2
6491- Index Cond: ((id >= 50) AND (id <= 51))
6492- Filter: (ctid = '(1,1)'::tid)
6493- -> Index Scan using p2_c1_c1_id_val_idx on p2_c1_c1 p2
6494- Index Cond: ((id >= 50) AND (id <= 51))
6495- Filter: (ctid = '(1,1)'::tid)
6496- -> Index Scan using p2_c1_c2_id_val_idx on p2_c1_c2 p2
6497- Index Cond: ((id >= 50) AND (id <= 51))
6498- Filter: (ctid = '(1,1)'::tid)
6499-(14 rows)
6500-
6501-/*+IndexScan(p2 p2_val_id_idx)*/
6502-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6503-LOG: available indexes for IndexScan(p2): p2_val_id_idx
6504-LOG: available indexes for IndexScan(p2_c1): p2_c1_val_id_idx
6505-LOG: available indexes for IndexScan(p2_c2): p2_c2_val_id_idx
6506-LOG: available indexes for IndexScan(p2_c3): p2_c3_val_id_idx
6507-LOG: available indexes for IndexScan(p2_c4):
6508-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_val_id_idx
6509-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_val_id_idx
6510-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_val_id_idx
6511-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_val_id_idx
6512-LOG: pg_hint_plan:
6513-used hint:
6514-IndexScan(p2 p2_val_id_idx)
6515-not used hint:
6516-duplication hint:
6517-error hint:
6518-
6519- QUERY PLAN
6520------------------------------------------------------------------
6521- Result
6522- -> Append
6523- -> Index Scan using p2_val_id_idx on p2
6524- Index Cond: ((id >= 50) AND (id <= 51))
6525- Filter: (ctid = '(1,1)'::tid)
6526- -> Index Scan using p2_c1_val_id_idx on p2_c1 p2
6527- Index Cond: ((id >= 50) AND (id <= 51))
6528- Filter: (ctid = '(1,1)'::tid)
6529- -> Index Scan using p2_c1_c1_val_id_idx on p2_c1_c1 p2
6530- Index Cond: ((id >= 50) AND (id <= 51))
6531- Filter: (ctid = '(1,1)'::tid)
6532- -> Index Scan using p2_c1_c2_val_id_idx on p2_c1_c2 p2
6533- Index Cond: ((id >= 50) AND (id <= 51))
6534- Filter: (ctid = '(1,1)'::tid)
6535-(14 rows)
6536-
6537-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
6538- QUERY PLAN
6539------------------------------------------------------------------------------------------------
6540- Result
6541- -> Append
6542- -> Seq Scan on p2
6543- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6544- -> Seq Scan on p2_c1 p2
6545- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6546- -> Seq Scan on p2_c2 p2
6547- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6548- -> Seq Scan on p2_c3 p2
6549- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6550- -> Tid Scan on p2_c4 p2
6551- TID Cond: (ctid = '(1,1)'::tid)
6552- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6553- -> Tid Scan on p2_c1_c1 p2
6554- TID Cond: (ctid = '(1,1)'::tid)
6555- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6556- -> Tid Scan on p2_c1_c2 p2
6557- TID Cond: (ctid = '(1,1)'::tid)
6558- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6559- -> Tid Scan on p2_c3_c1 p2
6560- TID Cond: (ctid = '(1,1)'::tid)
6561- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6562- -> Tid Scan on p2_c3_c2 p2
6563- TID Cond: (ctid = '(1,1)'::tid)
6564- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6565-(25 rows)
6566-
6567-/*+IndexScan(p2 p2_val)*/
6568-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
6569-LOG: available indexes for IndexScan(p2):
6570-LOG: available indexes for IndexScan(p2_c1):
6571-LOG: available indexes for IndexScan(p2_c2):
6572-LOG: available indexes for IndexScan(p2_c3):
6573-LOG: available indexes for IndexScan(p2_c4):
6574-LOG: available indexes for IndexScan(p2_c1_c1):
6575-LOG: available indexes for IndexScan(p2_c1_c2):
6576-LOG: available indexes for IndexScan(p2_c3_c1):
6577-LOG: available indexes for IndexScan(p2_c3_c2):
6578-LOG: pg_hint_plan:
6579-used hint:
6580-IndexScan(p2 p2_val)
6581-not used hint:
6582-duplication hint:
6583-error hint:
6584-
6585- QUERY PLAN
6586------------------------------------------------------------------------------------------------
6587- Result
6588- -> Append
6589- -> Seq Scan on p2
6590- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6591- -> Seq Scan on p2_c1 p2
6592- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6593- -> Seq Scan on p2_c2 p2
6594- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6595- -> Seq Scan on p2_c3 p2
6596- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
6597- -> Tid Scan on p2_c4 p2
6598- TID Cond: (ctid = '(1,1)'::tid)
6599- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6600- -> Tid Scan on p2_c1_c1 p2
6601- TID Cond: (ctid = '(1,1)'::tid)
6602- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6603- -> Tid Scan on p2_c1_c2 p2
6604- TID Cond: (ctid = '(1,1)'::tid)
6605- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6606- -> Tid Scan on p2_c3_c1 p2
6607- TID Cond: (ctid = '(1,1)'::tid)
6608- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6609- -> Tid Scan on p2_c3_c2 p2
6610- TID Cond: (ctid = '(1,1)'::tid)
6611- Filter: ((val >= '50'::text) AND (val <= '51'::text))
6612-(25 rows)
6613-
6614-/*+IndexScan(p2 p2_pkey)*/
6615-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6616-LOG: available indexes for IndexScan(p2): p2_pkey
6617-LOG: available indexes for IndexScan(p2_c1): p2_c1_pkey
6618-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6619-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6620-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6621-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6622-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6623-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6624-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6625-LOG: pg_hint_plan:
6626-used hint:
6627-IndexScan(p2 p2_pkey)
6628-not used hint:
6629-duplication hint:
6630-error hint:
6631-
6632- QUERY PLAN
6633------------------------------------------------------------
6634- Result
6635- -> Append
6636- -> Index Scan using p2_pkey on p2
6637- Index Cond: ((id >= 50) AND (id <= 51))
6638- Filter: (ctid = '(1,1)'::tid)
6639- -> Index Scan using p2_c1_pkey on p2_c1 p2
6640- Index Cond: ((id >= 50) AND (id <= 51))
6641- Filter: (ctid = '(1,1)'::tid)
6642- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6643- Index Cond: ((id >= 50) AND (id <= 51))
6644- Filter: (ctid = '(1,1)'::tid)
6645- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6646- Index Cond: ((id >= 50) AND (id <= 51))
6647- Filter: (ctid = '(1,1)'::tid)
6648-(14 rows)
6649-
6650-/*+IndexScan(p2 p2_id2_val)*/
6651-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6652-LOG: available indexes for IndexScan(p2): p2_id2_val
6653-LOG: available indexes for IndexScan(p2_c1): p2_c1_id2_val
6654-LOG: available indexes for IndexScan(p2_c2): p2_c2_id2_val
6655-LOG: available indexes for IndexScan(p2_c3):
6656-LOG: available indexes for IndexScan(p2_c4):
6657-LOG: available indexes for IndexScan(p2_c1_c1):
6658-LOG: available indexes for IndexScan(p2_c1_c2):
6659-LOG: available indexes for IndexScan(p2_c3_c1):
6660-LOG: available indexes for IndexScan(p2_c3_c2):
6661-LOG: pg_hint_plan:
6662-used hint:
6663-IndexScan(p2 p2_id2_val)
6664-not used hint:
6665-duplication hint:
6666-error hint:
6667-
6668- QUERY PLAN
6669--------------------------------------------------------------------------------------
6670- Result
6671- -> Append
6672- -> Index Scan using p2_id2_val on p2
6673- Index Cond: ((id >= 50) AND (id <= 51) AND (id >= 50) AND (id <= 51))
6674- Filter: (ctid = '(1,1)'::tid)
6675- -> Index Scan using p2_c1_id2_val on p2_c1 p2
6676- Index Cond: ((id >= 50) AND (id <= 51) AND (id >= 50) AND (id <= 51))
6677- Filter: (ctid = '(1,1)'::tid)
6678- -> Tid Scan on p2_c1_c1 p2
6679- TID Cond: (ctid = '(1,1)'::tid)
6680- Filter: ((id >= 50) AND (id <= 51))
6681- -> Tid Scan on p2_c1_c2 p2
6682- TID Cond: (ctid = '(1,1)'::tid)
6683- Filter: ((id >= 50) AND (id <= 51))
6684-(14 rows)
6685-
6686-/*+IndexScan(p2 p2_val2_id)*/
6687-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6688-LOG: available indexes for IndexScan(p2): p2_val2_id
6689-LOG: available indexes for IndexScan(p2_c1):
6690-LOG: available indexes for IndexScan(p2_c2):
6691-LOG: available indexes for IndexScan(p2_c3):
6692-LOG: available indexes for IndexScan(p2_c4):
6693-LOG: available indexes for IndexScan(p2_c1_c1):
6694-LOG: available indexes for IndexScan(p2_c1_c2):
6695-LOG: available indexes for IndexScan(p2_c3_c1):
6696-LOG: available indexes for IndexScan(p2_c3_c2):
6697-LOG: pg_hint_plan:
6698-used hint:
6699-IndexScan(p2 p2_val2_id)
6700-not used hint:
6701-duplication hint:
6702-error hint:
6703-
6704- QUERY PLAN
6705------------------------------------------------------------------------------
6706- Result
6707- -> Append
6708- -> Index Scan using p2_val2_id on p2
6709- Index Cond: ((id >= 50) AND (id <= 51))
6710- Filter: (ctid = '(1,1)'::tid)
6711- -> Seq Scan on p2_c1 p2
6712- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6713- -> Tid Scan on p2_c1_c1 p2
6714- TID Cond: (ctid = '(1,1)'::tid)
6715- Filter: ((id >= 50) AND (id <= 51))
6716- -> Tid Scan on p2_c1_c2 p2
6717- TID Cond: (ctid = '(1,1)'::tid)
6718- Filter: ((id >= 50) AND (id <= 51))
6719-(13 rows)
6720-
6721-/*+IndexScan(p2 p2_pkey)*/
6722-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6723-LOG: available indexes for IndexScan(p2): p2_pkey
6724-LOG: available indexes for IndexScan(p2_c1): p2_c1_pkey
6725-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6726-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6727-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6728-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6729-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6730-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6731-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6732-LOG: pg_hint_plan:
6733-used hint:
6734-IndexScan(p2 p2_pkey)
6735-not used hint:
6736-duplication hint:
6737-error hint:
6738-
6739- QUERY PLAN
6740------------------------------------------------------------
6741- Result
6742- -> Append
6743- -> Index Scan using p2_pkey on p2
6744- Index Cond: ((id >= 50) AND (id <= 51))
6745- Filter: (ctid = '(1,1)'::tid)
6746- -> Index Scan using p2_c1_pkey on p2_c1 p2
6747- Index Cond: ((id >= 50) AND (id <= 51))
6748- Filter: (ctid = '(1,1)'::tid)
6749- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6750- Index Cond: ((id >= 50) AND (id <= 51))
6751- Filter: (ctid = '(1,1)'::tid)
6752- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6753- Index Cond: ((id >= 50) AND (id <= 51))
6754- Filter: (ctid = '(1,1)'::tid)
6755-(14 rows)
6756-
6757-/*+IndexScan(p2 p2_c1_id_val_idx)*/
6758-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6759-LOG: available indexes for IndexScan(p2):
6760-LOG: available indexes for IndexScan(p2_c1): p2_c1_id_val_idx
6761-LOG: available indexes for IndexScan(p2_c2):
6762-LOG: available indexes for IndexScan(p2_c3):
6763-LOG: available indexes for IndexScan(p2_c4):
6764-LOG: available indexes for IndexScan(p2_c1_c1):
6765-LOG: available indexes for IndexScan(p2_c1_c2):
6766-LOG: available indexes for IndexScan(p2_c3_c1):
6767-LOG: available indexes for IndexScan(p2_c3_c2):
6768-LOG: pg_hint_plan:
6769-used hint:
6770-IndexScan(p2 p2_c1_id_val_idx)
6771-not used hint:
6772-duplication hint:
6773-error hint:
6774-
6775- QUERY PLAN
6776------------------------------------------------------------------------------
6777- Result
6778- -> Append
6779- -> Seq Scan on p2
6780- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6781- -> Index Scan using p2_c1_id_val_idx on p2_c1 p2
6782- Index Cond: ((id >= 50) AND (id <= 51))
6783- Filter: (ctid = '(1,1)'::tid)
6784- -> Tid Scan on p2_c1_c1 p2
6785- TID Cond: (ctid = '(1,1)'::tid)
6786- Filter: ((id >= 50) AND (id <= 51))
6787- -> Tid Scan on p2_c1_c2 p2
6788- TID Cond: (ctid = '(1,1)'::tid)
6789- Filter: ((id >= 50) AND (id <= 51))
6790-(13 rows)
6791-
6792-/*+IndexScan(p2 no_exist)*/
6793-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6794-LOG: available indexes for IndexScan(p2):
6795-LOG: available indexes for IndexScan(p2_c1):
6796-LOG: available indexes for IndexScan(p2_c2):
6797-LOG: available indexes for IndexScan(p2_c3):
6798-LOG: available indexes for IndexScan(p2_c4):
6799-LOG: available indexes for IndexScan(p2_c1_c1):
6800-LOG: available indexes for IndexScan(p2_c1_c2):
6801-LOG: available indexes for IndexScan(p2_c3_c1):
6802-LOG: available indexes for IndexScan(p2_c3_c2):
6803-LOG: pg_hint_plan:
6804-used hint:
6805-IndexScan(p2 no_exist)
6806-not used hint:
6807-duplication hint:
6808-error hint:
6809-
6810- QUERY PLAN
6811------------------------------------------------------------------------------
6812- Result
6813- -> Append
6814- -> Seq Scan on p2
6815- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6816- -> Seq Scan on p2_c1 p2
6817- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6818- -> Tid Scan on p2_c1_c1 p2
6819- TID Cond: (ctid = '(1,1)'::tid)
6820- Filter: ((id >= 50) AND (id <= 51))
6821- -> Tid Scan on p2_c1_c2 p2
6822- TID Cond: (ctid = '(1,1)'::tid)
6823- Filter: ((id >= 50) AND (id <= 51))
6824-(12 rows)
6825-
6826-/*+IndexScan(p2 p2_pkey p2_c1_id_val_idx)*/
6827-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6828-LOG: available indexes for IndexScan(p2): p2_pkey
6829-LOG: available indexes for IndexScan(p2_c1): p2_c1_id_val_idx p2_c1_pkey
6830-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6831-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6832-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6833-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6834-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6835-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6836-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6837-LOG: pg_hint_plan:
6838-used hint:
6839-IndexScan(p2 p2_pkey p2_c1_id_val_idx)
6840-not used hint:
6841-duplication hint:
6842-error hint:
6843-
6844- QUERY PLAN
6845------------------------------------------------------------
6846- Result
6847- -> Append
6848- -> Index Scan using p2_pkey on p2
6849- Index Cond: ((id >= 50) AND (id <= 51))
6850- Filter: (ctid = '(1,1)'::tid)
6851- -> Index Scan using p2_c1_id_val_idx on p2_c1 p2
6852- Index Cond: ((id >= 50) AND (id <= 51))
6853- Filter: (ctid = '(1,1)'::tid)
6854- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6855- Index Cond: ((id >= 50) AND (id <= 51))
6856- Filter: (ctid = '(1,1)'::tid)
6857- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6858- Index Cond: ((id >= 50) AND (id <= 51))
6859- Filter: (ctid = '(1,1)'::tid)
6860-(14 rows)
6861-
6862-/*+IndexScan(p2 p2_pkey no_exist)*/
6863-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6864-LOG: available indexes for IndexScan(p2): p2_pkey
6865-LOG: available indexes for IndexScan(p2_c1): p2_c1_pkey
6866-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6867-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6868-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6869-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6870-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6871-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6872-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6873-LOG: pg_hint_plan:
6874-used hint:
6875-IndexScan(p2 p2_pkey no_exist)
6876-not used hint:
6877-duplication hint:
6878-error hint:
6879-
6880- QUERY PLAN
6881------------------------------------------------------------
6882- Result
6883- -> Append
6884- -> Index Scan using p2_pkey on p2
6885- Index Cond: ((id >= 50) AND (id <= 51))
6886- Filter: (ctid = '(1,1)'::tid)
6887- -> Index Scan using p2_c1_pkey on p2_c1 p2
6888- Index Cond: ((id >= 50) AND (id <= 51))
6889- Filter: (ctid = '(1,1)'::tid)
6890- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6891- Index Cond: ((id >= 50) AND (id <= 51))
6892- Filter: (ctid = '(1,1)'::tid)
6893- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6894- Index Cond: ((id >= 50) AND (id <= 51))
6895- Filter: (ctid = '(1,1)'::tid)
6896-(14 rows)
6897-
6898-/*+IndexScan(p2 p2_c1_id_val_idx no_exist)*/
6899-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6900-LOG: available indexes for IndexScan(p2):
6901-LOG: available indexes for IndexScan(p2_c1): p2_c1_id_val_idx
6902-LOG: available indexes for IndexScan(p2_c2):
6903-LOG: available indexes for IndexScan(p2_c3):
6904-LOG: available indexes for IndexScan(p2_c4):
6905-LOG: available indexes for IndexScan(p2_c1_c1):
6906-LOG: available indexes for IndexScan(p2_c1_c2):
6907-LOG: available indexes for IndexScan(p2_c3_c1):
6908-LOG: available indexes for IndexScan(p2_c3_c2):
6909-LOG: pg_hint_plan:
6910-used hint:
6911-IndexScan(p2 p2_c1_id_val_idx no_exist)
6912-not used hint:
6913-duplication hint:
6914-error hint:
6915-
6916- QUERY PLAN
6917------------------------------------------------------------------------------
6918- Result
6919- -> Append
6920- -> Seq Scan on p2
6921- Filter: ((id >= 50) AND (id <= 51) AND (ctid = '(1,1)'::tid))
6922- -> Index Scan using p2_c1_id_val_idx on p2_c1 p2
6923- Index Cond: ((id >= 50) AND (id <= 51))
6924- Filter: (ctid = '(1,1)'::tid)
6925- -> Tid Scan on p2_c1_c1 p2
6926- TID Cond: (ctid = '(1,1)'::tid)
6927- Filter: ((id >= 50) AND (id <= 51))
6928- -> Tid Scan on p2_c1_c2 p2
6929- TID Cond: (ctid = '(1,1)'::tid)
6930- Filter: ((id >= 50) AND (id <= 51))
6931-(13 rows)
6932-
6933-/*+IndexScan(p2 p2_pkey p2_c1_id_val_idx no_exist)*/
6934-EXPLAIN (COSTS false) SELECT * FROM p2 WHERE id >= 50 AND id <= 51 AND p2.ctid = '(1,1)';
6935-LOG: available indexes for IndexScan(p2): p2_pkey
6936-LOG: available indexes for IndexScan(p2_c1): p2_c1_id_val_idx p2_c1_pkey
6937-LOG: available indexes for IndexScan(p2_c2): p2_c2_pkey
6938-LOG: available indexes for IndexScan(p2_c3): p2_c3_pkey
6939-LOG: available indexes for IndexScan(p2_c4): p2_c4_pkey
6940-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_pkey
6941-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_pkey
6942-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_pkey
6943-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_pkey
6944-LOG: pg_hint_plan:
6945-used hint:
6946-IndexScan(p2 p2_pkey p2_c1_id_val_idx no_exist)
6947-not used hint:
6948-duplication hint:
6949-error hint:
6950-
6951- QUERY PLAN
6952------------------------------------------------------------
6953- Result
6954- -> Append
6955- -> Index Scan using p2_pkey on p2
6956- Index Cond: ((id >= 50) AND (id <= 51))
6957- Filter: (ctid = '(1,1)'::tid)
6958- -> Index Scan using p2_c1_id_val_idx on p2_c1 p2
6959- Index Cond: ((id >= 50) AND (id <= 51))
6960- Filter: (ctid = '(1,1)'::tid)
6961- -> Index Scan using p2_c1_c1_pkey on p2_c1_c1 p2
6962- Index Cond: ((id >= 50) AND (id <= 51))
6963- Filter: (ctid = '(1,1)'::tid)
6964- -> Index Scan using p2_c1_c2_pkey on p2_c1_c2 p2
6965- Index Cond: ((id >= 50) AND (id <= 51))
6966- Filter: (ctid = '(1,1)'::tid)
6967-(14 rows)
6968-
6969-/*+IndexScan(p2 p2_val_idx)*/
6970-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
6971-LOG: available indexes for IndexScan(p2): p2_val_idx
6972-LOG: available indexes for IndexScan(p2_c1): p2_c1_val_idx
6973-LOG: available indexes for IndexScan(p2_c2): p2_c2_val_idx
6974-LOG: available indexes for IndexScan(p2_c3): p2_c3_val_idx
6975-LOG: available indexes for IndexScan(p2_c4): p2_c4_val_idx
6976-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_val_idx
6977-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_val_idx
6978-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_val_idx
6979-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_val_idx
6980-LOG: pg_hint_plan:
6981-used hint:
6982-IndexScan(p2 p2_val_idx)
6983-not used hint:
6984-duplication hint:
6985-error hint:
6986-
6987- QUERY PLAN
6988--------------------------------------------------------------------------
6989- Result
6990- -> Append
6991- -> Index Scan using p2_val_idx on p2
6992- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
6993- Filter: (ctid = '(1,1)'::tid)
6994- -> Index Scan using p2_c1_val_idx on p2_c1 p2
6995- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
6996- Filter: (ctid = '(1,1)'::tid)
6997- -> Index Scan using p2_c2_val_idx on p2_c2 p2
6998- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
6999- Filter: (ctid = '(1,1)'::tid)
7000- -> Index Scan using p2_c3_val_idx on p2_c3 p2
7001- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7002- Filter: (ctid = '(1,1)'::tid)
7003- -> Index Scan using p2_c4_val_idx on p2_c4 p2
7004- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7005- Filter: (ctid = '(1,1)'::tid)
7006- -> Index Scan using p2_c1_c1_val_idx on p2_c1_c1 p2
7007- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7008- Filter: (ctid = '(1,1)'::tid)
7009- -> Index Scan using p2_c1_c2_val_idx on p2_c1_c2 p2
7010- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7011- Filter: (ctid = '(1,1)'::tid)
7012- -> Index Scan using p2_c3_c1_val_idx on p2_c3_c1 p2
7013- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7014- Filter: (ctid = '(1,1)'::tid)
7015- -> Index Scan using p2_c3_c2_val_idx on p2_c3_c2 p2
7016- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7017- Filter: (ctid = '(1,1)'::tid)
7018-(29 rows)
7019-
7020-/*+IndexScan(p2 p2_expr)*/
7021-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
7022-LOG: available indexes for IndexScan(p2): p2_expr
7023-LOG: available indexes for IndexScan(p2_c1): p2_c1_expr_idx
7024-LOG: available indexes for IndexScan(p2_c2): p2_c2_expr_idx
7025-LOG: available indexes for IndexScan(p2_c3): p2_c3_expr_idx
7026-LOG: available indexes for IndexScan(p2_c4): p2_c4_expr_idx
7027-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_expr_idx
7028-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_expr_idx
7029-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_expr_idx
7030-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_expr_idx
7031-LOG: pg_hint_plan:
7032-used hint:
7033-IndexScan(p2 p2_expr)
7034-not used hint:
7035-duplication hint:
7036-error hint:
7037-
7038- QUERY PLAN
7039------------------------------------------------------------------------------------------------
7040- Result
7041- -> Append
7042- -> Seq Scan on p2
7043- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7044- -> Seq Scan on p2_c1 p2
7045- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7046- -> Seq Scan on p2_c2 p2
7047- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7048- -> Seq Scan on p2_c3 p2
7049- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7050- -> Tid Scan on p2_c4 p2
7051- TID Cond: (ctid = '(1,1)'::tid)
7052- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7053- -> Tid Scan on p2_c1_c1 p2
7054- TID Cond: (ctid = '(1,1)'::tid)
7055- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7056- -> Tid Scan on p2_c1_c2 p2
7057- TID Cond: (ctid = '(1,1)'::tid)
7058- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7059- -> Tid Scan on p2_c3_c1 p2
7060- TID Cond: (ctid = '(1,1)'::tid)
7061- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7062- -> Tid Scan on p2_c3_c2 p2
7063- TID Cond: (ctid = '(1,1)'::tid)
7064- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7065-(25 rows)
7066-
7067-/*+IndexScan(p2 p2_val_idx6)*/
7068-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
7069-LOG: available indexes for IndexScan(p2): p2_val_idx6
7070-LOG: available indexes for IndexScan(p2_c1): p2_c1_val_idx6
7071-LOG: available indexes for IndexScan(p2_c2): p2_c2_val_idx6
7072-LOG: available indexes for IndexScan(p2_c3): p2_c3_val_idx6
7073-LOG: available indexes for IndexScan(p2_c4): p2_c4_val_idx6
7074-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_val_idx6
7075-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_val_idx6
7076-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_val_idx6
7077-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_val_idx6
7078-LOG: pg_hint_plan:
7079-used hint:
7080-IndexScan(p2 p2_val_idx6)
7081-not used hint:
7082-duplication hint:
7083-error hint:
7084-
7085- QUERY PLAN
7086------------------------------------------------------------------------------------------------
7087- Result
7088- -> Append
7089- -> Seq Scan on p2
7090- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7091- -> Seq Scan on p2_c1 p2
7092- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7093- -> Seq Scan on p2_c2 p2
7094- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7095- -> Seq Scan on p2_c3 p2
7096- Filter: ((val >= '50'::text) AND (val <= '51'::text) AND (ctid = '(1,1)'::tid))
7097- -> Tid Scan on p2_c4 p2
7098- TID Cond: (ctid = '(1,1)'::tid)
7099- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7100- -> Tid Scan on p2_c1_c1 p2
7101- TID Cond: (ctid = '(1,1)'::tid)
7102- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7103- -> Tid Scan on p2_c1_c2 p2
7104- TID Cond: (ctid = '(1,1)'::tid)
7105- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7106- -> Tid Scan on p2_c3_c1 p2
7107- TID Cond: (ctid = '(1,1)'::tid)
7108- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7109- -> Tid Scan on p2_c3_c2 p2
7110- TID Cond: (ctid = '(1,1)'::tid)
7111- Filter: ((val >= '50'::text) AND (val <= '51'::text))
7112-(25 rows)
7113-
7114-/*+IndexScan(p2 p2_val_idx p2_val_idx6)*/
7115-EXPLAIN (COSTS false) SELECT val FROM p2 WHERE val >= '50' AND val <= '51' AND p2.ctid = '(1,1)';
7116-LOG: available indexes for IndexScan(p2): p2_val_idx6 p2_val_idx
7117-LOG: available indexes for IndexScan(p2_c1): p2_c1_val_idx6 p2_c1_val_idx
7118-LOG: available indexes for IndexScan(p2_c2): p2_c2_val_idx6 p2_c2_val_idx
7119-LOG: available indexes for IndexScan(p2_c3): p2_c3_val_idx6 p2_c3_val_idx
7120-LOG: available indexes for IndexScan(p2_c4): p2_c4_val_idx6 p2_c4_val_idx
7121-LOG: available indexes for IndexScan(p2_c1_c1): p2_c1_c1_val_idx6 p2_c1_c1_val_idx
7122-LOG: available indexes for IndexScan(p2_c1_c2): p2_c1_c2_val_idx6 p2_c1_c2_val_idx
7123-LOG: available indexes for IndexScan(p2_c3_c1): p2_c3_c1_val_idx6 p2_c3_c1_val_idx
7124-LOG: available indexes for IndexScan(p2_c3_c2): p2_c3_c2_val_idx6 p2_c3_c2_val_idx
7125-LOG: pg_hint_plan:
7126-used hint:
7127-IndexScan(p2 p2_val_idx p2_val_idx6)
7128-not used hint:
7129-duplication hint:
7130-error hint:
7131-
7132- QUERY PLAN
7133--------------------------------------------------------------------------
7134- Result
7135- -> Append
7136- -> Index Scan using p2_val_idx on p2
7137- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7138- Filter: (ctid = '(1,1)'::tid)
7139- -> Index Scan using p2_c1_val_idx on p2_c1 p2
7140- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7141- Filter: (ctid = '(1,1)'::tid)
7142- -> Index Scan using p2_c2_val_idx on p2_c2 p2
7143- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7144- Filter: (ctid = '(1,1)'::tid)
7145- -> Index Scan using p2_c3_val_idx on p2_c3 p2
7146- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7147- Filter: (ctid = '(1,1)'::tid)
7148- -> Index Scan using p2_c4_val_idx on p2_c4 p2
7149- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7150- Filter: (ctid = '(1,1)'::tid)
7151- -> Index Scan using p2_c1_c1_val_idx on p2_c1_c1 p2
7152- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7153- Filter: (ctid = '(1,1)'::tid)
7154- -> Index Scan using p2_c1_c2_val_idx on p2_c1_c2 p2
7155- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7156- Filter: (ctid = '(1,1)'::tid)
7157- -> Index Scan using p2_c3_c1_val_idx on p2_c3_c1 p2
7158- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7159- Filter: (ctid = '(1,1)'::tid)
7160- -> Index Scan using p2_c3_c2_val_idx on p2_c3_c2 p2
7161- Index Cond: ((val >= '50'::text) AND (val <= '51'::text))
7162- Filter: (ctid = '(1,1)'::tid)
7163-(29 rows)
7164-
7165--- regular expression
7166--- ordinary table
7167-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7168- QUERY PLAN
7169-----------------------------------------------------------------------------------------
7170- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7171- Index Cond: (id = 1)
7172-(2 rows)
7173-
7174-/*+ IndexScanRegexp(t5 t5_[^i].*)*/
7175-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7176-LOG: available indexes for IndexScanRegexp(t5): t5_val t5_pkey
7177-LOG: pg_hint_plan:
7178-used hint:
7179-IndexScanRegexp(t5 t5_[^i].*)
7180-not used hint:
7181-duplication hint:
7182-error hint:
7183-
7184- QUERY PLAN
7185---------------------------------
7186- Index Scan using t5_pkey on t5
7187- Index Cond: (id = 1)
7188-(2 rows)
7189-
7190-/*+ IndexScanRegexp(t5 t5_id[0-9].*)*/
7191-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7192-LOG: available indexes for IndexScanRegexp(t5): t5_id3 t5_id2 t5_id1
7193-LOG: pg_hint_plan:
7194-used hint:
7195-IndexScanRegexp(t5 t5_id[0-9].*)
7196-not used hint:
7197-duplication hint:
7198-error hint:
7199-
7200- QUERY PLAN
7201--------------------------------
7202- Index Scan using t5_id3 on t5
7203- Index Cond: (id = 1)
7204-(2 rows)
7205-
7206-/*+ IndexScanRegexp(t5 t5[^_].*)*/
7207-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7208-LOG: available indexes for IndexScanRegexp(t5):
7209-LOG: pg_hint_plan:
7210-used hint:
7211-IndexScanRegexp(t5 t5[^_].*)
7212-not used hint:
7213-duplication hint:
7214-error hint:
7215-
7216- QUERY PLAN
7217---------------------
7218- Seq Scan on t5
7219- Filter: (id = 1)
7220-(2 rows)
7221-
7222-/*+ IndexScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)*/
7223-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7224-LOG: available indexes for IndexScanRegexp(t5):
7225-LOG: pg_hint_plan:
7226-used hint:
7227-IndexScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)
7228-not used hint:
7229-duplication hint:
7230-error hint:
7231-
7232- QUERY PLAN
7233---------------------
7234- Seq Scan on t5
7235- Filter: (id = 1)
7236-(2 rows)
7237-
7238-/*+ IndexScan(t5 t5_id[0-9].*)*/
7239-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7240-LOG: available indexes for IndexScan(t5):
7241-LOG: pg_hint_plan:
7242-used hint:
7243-IndexScan(t5 t5_id[0-9].*)
7244-not used hint:
7245-duplication hint:
7246-error hint:
7247-
7248- QUERY PLAN
7249---------------------
7250- Seq Scan on t5
7251- Filter: (id = 1)
7252-(2 rows)
7253-
7254-/*+ IndexOnlyScanRegexp(t5 t5_[^i].*)*/
7255-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7256-INFO: hint syntax error at or near "IndexOnlyScanRegexp(t5 t5_[^i].*)"
7257-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7258- QUERY PLAN
7259-----------------------------------------------------------------------------------------
7260- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7261- Index Cond: (id = 1)
7262-(2 rows)
7263-
7264-/*+ IndexOnlyScanRegexp(t5 t5_id[0-9].*)*/
7265-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7266-INFO: hint syntax error at or near "IndexOnlyScanRegexp(t5 t5_id[0-9].*)"
7267-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7268- QUERY PLAN
7269-----------------------------------------------------------------------------------------
7270- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7271- Index Cond: (id = 1)
7272-(2 rows)
7273-
7274-/*+ IndexOnlyScanRegexp(t5 t5[^_].*)*/
7275-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7276-INFO: hint syntax error at or near "IndexOnlyScanRegexp(t5 t5[^_].*)"
7277-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7278- QUERY PLAN
7279-----------------------------------------------------------------------------------------
7280- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7281- Index Cond: (id = 1)
7282-(2 rows)
7283-
7284-/*+ IndexOnlyScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)*/
7285-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7286-INFO: hint syntax error at or near "IndexOnlyScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)"
7287-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7288- QUERY PLAN
7289-----------------------------------------------------------------------------------------
7290- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7291- Index Cond: (id = 1)
7292-(2 rows)
7293-
7294-/*+ IndexOnlyScan(t5 t5_id[0-9].*)*/
7295-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7296-INFO: hint syntax error at or near "IndexOnlyScan(t5 t5_id[0-9].*)"
7297-DETAIL: Unrecognized hint keyword "IndexOnlyScan".
7298- QUERY PLAN
7299-----------------------------------------------------------------------------------------
7300- Index Scan using t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa on t5
7301- Index Cond: (id = 1)
7302-(2 rows)
7303-
7304-/*+ BitmapScanRegexp(t5 t5_[^i].*)*/
7305-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7306-LOG: available indexes for BitmapScanRegexp(t5): t5_val t5_pkey
7307-LOG: pg_hint_plan:
7308-used hint:
7309-BitmapScanRegexp(t5 t5_[^i].*)
7310-not used hint:
7311-duplication hint:
7312-error hint:
7313-
7314- QUERY PLAN
7315-------------------------------------
7316- Bitmap Heap Scan on t5
7317- Recheck Cond: (id = 1)
7318- -> Bitmap Index Scan on t5_pkey
7319- Index Cond: (id = 1)
7320-(4 rows)
7321-
7322-/*+ BitmapScanRegexp(t5 t5_id[0-9].*)*/
7323-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7324-LOG: available indexes for BitmapScanRegexp(t5): t5_id3 t5_id2 t5_id1
7325-LOG: pg_hint_plan:
7326-used hint:
7327-BitmapScanRegexp(t5 t5_id[0-9].*)
7328-not used hint:
7329-duplication hint:
7330-error hint:
7331-
7332- QUERY PLAN
7333------------------------------------
7334- Bitmap Heap Scan on t5
7335- Recheck Cond: (id = 1)
7336- -> Bitmap Index Scan on t5_id3
7337- Index Cond: (id = 1)
7338-(4 rows)
7339-
7340-/*+ BitmapScanRegexp(t5 t5[^_].*)*/
7341-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7342-LOG: available indexes for BitmapScanRegexp(t5):
7343-LOG: pg_hint_plan:
7344-used hint:
7345-BitmapScanRegexp(t5 t5[^_].*)
7346-not used hint:
7347-duplication hint:
7348-error hint:
7349-
7350- QUERY PLAN
7351---------------------
7352- Seq Scan on t5
7353- Filter: (id = 1)
7354-(2 rows)
7355-
7356-/*+ BitmapScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)*/
7357-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7358-LOG: available indexes for BitmapScanRegexp(t5):
7359-LOG: pg_hint_plan:
7360-used hint:
7361-BitmapScanRegexp(t5 ^.*t5_idaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab)
7362-not used hint:
7363-duplication hint:
7364-error hint:
7365-
7366- QUERY PLAN
7367---------------------
7368- Seq Scan on t5
7369- Filter: (id = 1)
7370-(2 rows)
7371-
7372-/*+ BitmapScan(t5 t5_id[0-9].*)*/
7373-EXPLAIN (COSTS false) SELECT id FROM t5 WHERE id = 1;
7374-LOG: available indexes for BitmapScan(t5):
7375-LOG: pg_hint_plan:
7376-used hint:
7377-BitmapScan(t5 t5_id[0-9].*)
7378-not used hint:
7379-duplication hint:
7380-error hint:
7381-
7382- QUERY PLAN
7383---------------------
7384- Seq Scan on t5
7385- Filter: (id = 1)
7386-(2 rows)
7387-
7388--- Inheritance
7389-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7390- QUERY PLAN
7391--------------------------------------
7392- Result
7393- -> Append
7394- -> Seq Scan on p1
7395- Filter: (val = 1)
7396- -> Seq Scan on p1_c1 p1
7397- Filter: (val = 1)
7398- -> Seq Scan on p1_c2 p1
7399- Filter: (val = 1)
7400- -> Seq Scan on p1_c3 p1
7401- Filter: (val = 1)
7402- -> Seq Scan on p1_c4 p1
7403- Filter: (val = 1)
7404- -> Seq Scan on p1_c1_c1 p1
7405- Filter: (val = 1)
7406- -> Seq Scan on p1_c1_c2 p1
7407- Filter: (val = 1)
7408- -> Seq Scan on p1_c3_c1 p1
7409- Filter: (val = 1)
7410- -> Seq Scan on p1_c3_c2 p1
7411- Filter: (val = 1)
7412-(20 rows)
7413-
7414-/*+ IndexScanRegexp(p1 p1_.*[^0-9]$)*/
7415-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7416-LOG: available indexes for IndexScanRegexp(p1): p1_pkey
7417-LOG: available indexes for IndexScanRegexp(p1_c1): p1_c1_pkey
7418-LOG: available indexes for IndexScanRegexp(p1_c2): p1_c2_pkey
7419-LOG: available indexes for IndexScanRegexp(p1_c3): p1_c3_pkey
7420-LOG: available indexes for IndexScanRegexp(p1_c4): p1_c4_pkey
7421-LOG: available indexes for IndexScanRegexp(p1_c1_c1): p1_c1_c1_pkey
7422-LOG: available indexes for IndexScanRegexp(p1_c1_c2): p1_c1_c2_pkey
7423-LOG: available indexes for IndexScanRegexp(p1_c3_c1): p1_c3_c1_pkey
7424-LOG: available indexes for IndexScanRegexp(p1_c3_c2): p1_c3_c2_pkey
7425-LOG: pg_hint_plan:
7426-used hint:
7427-IndexScanRegexp(p1 p1_.*[^0-9]$)
7428-not used hint:
7429-duplication hint:
7430-error hint:
7431-
7432- QUERY PLAN
7433--------------------------------------
7434- Result
7435- -> Append
7436- -> Seq Scan on p1
7437- Filter: (val = 1)
7438- -> Seq Scan on p1_c1 p1
7439- Filter: (val = 1)
7440- -> Seq Scan on p1_c2 p1
7441- Filter: (val = 1)
7442- -> Seq Scan on p1_c3 p1
7443- Filter: (val = 1)
7444- -> Seq Scan on p1_c4 p1
7445- Filter: (val = 1)
7446- -> Seq Scan on p1_c1_c1 p1
7447- Filter: (val = 1)
7448- -> Seq Scan on p1_c1_c2 p1
7449- Filter: (val = 1)
7450- -> Seq Scan on p1_c3_c1 p1
7451- Filter: (val = 1)
7452- -> Seq Scan on p1_c3_c2 p1
7453- Filter: (val = 1)
7454-(20 rows)
7455-
7456-/*+ IndexScanRegexp(p1 p1_.*val2.*)*/
7457-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7458-LOG: available indexes for IndexScanRegexp(p1): p1_val2
7459-LOG: available indexes for IndexScanRegexp(p1_c1): p1_c1_val2
7460-LOG: available indexes for IndexScanRegexp(p1_c2): p1_c2_val2
7461-LOG: available indexes for IndexScanRegexp(p1_c3): p1_c3_val2
7462-LOG: available indexes for IndexScanRegexp(p1_c4): p1_c4_val2
7463-LOG: available indexes for IndexScanRegexp(p1_c1_c1): p1_c1_c1_val2
7464-LOG: available indexes for IndexScanRegexp(p1_c1_c2): p1_c1_c2_val2
7465-LOG: available indexes for IndexScanRegexp(p1_c3_c1): p1_c3_c1_val2
7466-LOG: available indexes for IndexScanRegexp(p1_c3_c2): p1_c3_c2_val2
7467-LOG: pg_hint_plan:
7468-used hint:
7469-IndexScanRegexp(p1 p1_.*val2.*)
7470-not used hint:
7471-duplication hint:
7472-error hint:
7473-
7474- QUERY PLAN
7475------------------------------------------------------------
7476- Result
7477- -> Append
7478- -> Index Scan using p1_val2 on p1
7479- Index Cond: (val = 1)
7480- -> Index Scan using p1_c1_val2 on p1_c1 p1
7481- Index Cond: (val = 1)
7482- -> Index Scan using p1_c2_val2 on p1_c2 p1
7483- Index Cond: (val = 1)
7484- -> Index Scan using p1_c3_val2 on p1_c3 p1
7485- Index Cond: (val = 1)
7486- -> Index Scan using p1_c4_val2 on p1_c4 p1
7487- Index Cond: (val = 1)
7488- -> Index Scan using p1_c1_c1_val2 on p1_c1_c1 p1
7489- Index Cond: (val = 1)
7490- -> Index Scan using p1_c1_c2_val2 on p1_c1_c2 p1
7491- Index Cond: (val = 1)
7492- -> Index Scan using p1_c3_c1_val2 on p1_c3_c1 p1
7493- Index Cond: (val = 1)
7494- -> Index Scan using p1_c3_c2_val2 on p1_c3_c2 p1
7495- Index Cond: (val = 1)
7496-(20 rows)
7497-
7498-/*+ IndexScanRegexp(p1 p1[^_].*)*/
7499-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7500-LOG: available indexes for IndexScanRegexp(p1):
7501-LOG: available indexes for IndexScanRegexp(p1_c1):
7502-LOG: available indexes for IndexScanRegexp(p1_c2):
7503-LOG: available indexes for IndexScanRegexp(p1_c3):
7504-LOG: available indexes for IndexScanRegexp(p1_c4):
7505-LOG: available indexes for IndexScanRegexp(p1_c1_c1):
7506-LOG: available indexes for IndexScanRegexp(p1_c1_c2):
7507-LOG: available indexes for IndexScanRegexp(p1_c3_c1):
7508-LOG: available indexes for IndexScanRegexp(p1_c3_c2):
7509-LOG: pg_hint_plan:
7510-used hint:
7511-IndexScanRegexp(p1 p1[^_].*)
7512-not used hint:
7513-duplication hint:
7514-error hint:
7515-
7516- QUERY PLAN
7517--------------------------------------
7518- Result
7519- -> Append
7520- -> Seq Scan on p1
7521- Filter: (val = 1)
7522- -> Seq Scan on p1_c1 p1
7523- Filter: (val = 1)
7524- -> Seq Scan on p1_c2 p1
7525- Filter: (val = 1)
7526- -> Seq Scan on p1_c3 p1
7527- Filter: (val = 1)
7528- -> Seq Scan on p1_c4 p1
7529- Filter: (val = 1)
7530- -> Seq Scan on p1_c1_c1 p1
7531- Filter: (val = 1)
7532- -> Seq Scan on p1_c1_c2 p1
7533- Filter: (val = 1)
7534- -> Seq Scan on p1_c3_c1 p1
7535- Filter: (val = 1)
7536- -> Seq Scan on p1_c3_c2 p1
7537- Filter: (val = 1)
7538-(20 rows)
7539-
7540-/*+ IndexScan(p1 p1_.*val2.*)*/
7541-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7542-LOG: available indexes for IndexScan(p1):
7543-LOG: available indexes for IndexScan(p1_c1):
7544-LOG: available indexes for IndexScan(p1_c2):
7545-LOG: available indexes for IndexScan(p1_c3):
7546-LOG: available indexes for IndexScan(p1_c4):
7547-LOG: available indexes for IndexScan(p1_c1_c1):
7548-LOG: available indexes for IndexScan(p1_c1_c2):
7549-LOG: available indexes for IndexScan(p1_c3_c1):
7550-LOG: available indexes for IndexScan(p1_c3_c2):
7551-LOG: pg_hint_plan:
7552-used hint:
7553-IndexScan(p1 p1_.*val2.*)
7554-not used hint:
7555-duplication hint:
7556-error hint:
7557-
7558- QUERY PLAN
7559--------------------------------------
7560- Result
7561- -> Append
7562- -> Seq Scan on p1
7563- Filter: (val = 1)
7564- -> Seq Scan on p1_c1 p1
7565- Filter: (val = 1)
7566- -> Seq Scan on p1_c2 p1
7567- Filter: (val = 1)
7568- -> Seq Scan on p1_c3 p1
7569- Filter: (val = 1)
7570- -> Seq Scan on p1_c4 p1
7571- Filter: (val = 1)
7572- -> Seq Scan on p1_c1_c1 p1
7573- Filter: (val = 1)
7574- -> Seq Scan on p1_c1_c2 p1
7575- Filter: (val = 1)
7576- -> Seq Scan on p1_c3_c1 p1
7577- Filter: (val = 1)
7578- -> Seq Scan on p1_c3_c2 p1
7579- Filter: (val = 1)
7580-(20 rows)
7581-
7582-/*+ IndexOnlyScanRegexp(p1 p1_.*[^0-9]$)*/
7583-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7584-INFO: hint syntax error at or near "IndexOnlyScanRegexp(p1 p1_.*[^0-9]$)"
7585-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7586- QUERY PLAN
7587--------------------------------------
7588- Result
7589- -> Append
7590- -> Seq Scan on p1
7591- Filter: (val = 1)
7592- -> Seq Scan on p1_c1 p1
7593- Filter: (val = 1)
7594- -> Seq Scan on p1_c2 p1
7595- Filter: (val = 1)
7596- -> Seq Scan on p1_c3 p1
7597- Filter: (val = 1)
7598- -> Seq Scan on p1_c4 p1
7599- Filter: (val = 1)
7600- -> Seq Scan on p1_c1_c1 p1
7601- Filter: (val = 1)
7602- -> Seq Scan on p1_c1_c2 p1
7603- Filter: (val = 1)
7604- -> Seq Scan on p1_c3_c1 p1
7605- Filter: (val = 1)
7606- -> Seq Scan on p1_c3_c2 p1
7607- Filter: (val = 1)
7608-(20 rows)
7609-
7610-/*+ IndexOnlyScanRegexp(p1 p1_.*val2.*)*/
7611-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7612-INFO: hint syntax error at or near "IndexOnlyScanRegexp(p1 p1_.*val2.*)"
7613-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7614- QUERY PLAN
7615--------------------------------------
7616- Result
7617- -> Append
7618- -> Seq Scan on p1
7619- Filter: (val = 1)
7620- -> Seq Scan on p1_c1 p1
7621- Filter: (val = 1)
7622- -> Seq Scan on p1_c2 p1
7623- Filter: (val = 1)
7624- -> Seq Scan on p1_c3 p1
7625- Filter: (val = 1)
7626- -> Seq Scan on p1_c4 p1
7627- Filter: (val = 1)
7628- -> Seq Scan on p1_c1_c1 p1
7629- Filter: (val = 1)
7630- -> Seq Scan on p1_c1_c2 p1
7631- Filter: (val = 1)
7632- -> Seq Scan on p1_c3_c1 p1
7633- Filter: (val = 1)
7634- -> Seq Scan on p1_c3_c2 p1
7635- Filter: (val = 1)
7636-(20 rows)
7637-
7638-/*+ IndexOnlyScanRegexp(p1 p1[^_].*)*/
7639-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7640-INFO: hint syntax error at or near "IndexOnlyScanRegexp(p1 p1[^_].*)"
7641-DETAIL: Unrecognized hint keyword "IndexOnlyScanRegexp".
7642- QUERY PLAN
7643--------------------------------------
7644- Result
7645- -> Append
7646- -> Seq Scan on p1
7647- Filter: (val = 1)
7648- -> Seq Scan on p1_c1 p1
7649- Filter: (val = 1)
7650- -> Seq Scan on p1_c2 p1
7651- Filter: (val = 1)
7652- -> Seq Scan on p1_c3 p1
7653- Filter: (val = 1)
7654- -> Seq Scan on p1_c4 p1
7655- Filter: (val = 1)
7656- -> Seq Scan on p1_c1_c1 p1
7657- Filter: (val = 1)
7658- -> Seq Scan on p1_c1_c2 p1
7659- Filter: (val = 1)
7660- -> Seq Scan on p1_c3_c1 p1
7661- Filter: (val = 1)
7662- -> Seq Scan on p1_c3_c2 p1
7663- Filter: (val = 1)
7664-(20 rows)
7665-
7666-/*+ IndexOnlyScan(p1 p1_.*val2.*)*/
7667-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7668-INFO: hint syntax error at or near "IndexOnlyScan(p1 p1_.*val2.*)"
7669-DETAIL: Unrecognized hint keyword "IndexOnlyScan".
7670- QUERY PLAN
7671--------------------------------------
7672- Result
7673- -> Append
7674- -> Seq Scan on p1
7675- Filter: (val = 1)
7676- -> Seq Scan on p1_c1 p1
7677- Filter: (val = 1)
7678- -> Seq Scan on p1_c2 p1
7679- Filter: (val = 1)
7680- -> Seq Scan on p1_c3 p1
7681- Filter: (val = 1)
7682- -> Seq Scan on p1_c4 p1
7683- Filter: (val = 1)
7684- -> Seq Scan on p1_c1_c1 p1
7685- Filter: (val = 1)
7686- -> Seq Scan on p1_c1_c2 p1
7687- Filter: (val = 1)
7688- -> Seq Scan on p1_c3_c1 p1
7689- Filter: (val = 1)
7690- -> Seq Scan on p1_c3_c2 p1
7691- Filter: (val = 1)
7692-(20 rows)
7693-
7694-/*+ BitmapScanRegexp(p1 p1_.*[^0-9]$)*/
7695-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7696-LOG: available indexes for BitmapScanRegexp(p1): p1_pkey
7697-LOG: available indexes for BitmapScanRegexp(p1_c1): p1_c1_pkey
7698-LOG: available indexes for BitmapScanRegexp(p1_c2): p1_c2_pkey
7699-LOG: available indexes for BitmapScanRegexp(p1_c3): p1_c3_pkey
7700-LOG: available indexes for BitmapScanRegexp(p1_c4): p1_c4_pkey
7701-LOG: available indexes for BitmapScanRegexp(p1_c1_c1): p1_c1_c1_pkey
7702-LOG: available indexes for BitmapScanRegexp(p1_c1_c2): p1_c1_c2_pkey
7703-LOG: available indexes for BitmapScanRegexp(p1_c3_c1): p1_c3_c1_pkey
7704-LOG: available indexes for BitmapScanRegexp(p1_c3_c2): p1_c3_c2_pkey
7705-LOG: pg_hint_plan:
7706-used hint:
7707-BitmapScanRegexp(p1 p1_.*[^0-9]$)
7708-not used hint:
7709-duplication hint:
7710-error hint:
7711-
7712- QUERY PLAN
7713--------------------------------------
7714- Result
7715- -> Append
7716- -> Seq Scan on p1
7717- Filter: (val = 1)
7718- -> Seq Scan on p1_c1 p1
7719- Filter: (val = 1)
7720- -> Seq Scan on p1_c2 p1
7721- Filter: (val = 1)
7722- -> Seq Scan on p1_c3 p1
7723- Filter: (val = 1)
7724- -> Seq Scan on p1_c4 p1
7725- Filter: (val = 1)
7726- -> Seq Scan on p1_c1_c1 p1
7727- Filter: (val = 1)
7728- -> Seq Scan on p1_c1_c2 p1
7729- Filter: (val = 1)
7730- -> Seq Scan on p1_c3_c1 p1
7731- Filter: (val = 1)
7732- -> Seq Scan on p1_c3_c2 p1
7733- Filter: (val = 1)
7734-(20 rows)
7735-
7736-/*+ BitmapScanRegexp(p1 p1_.*val2.*)*/
7737-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7738-LOG: available indexes for BitmapScanRegexp(p1): p1_val2
7739-LOG: available indexes for BitmapScanRegexp(p1_c1): p1_c1_val2
7740-LOG: available indexes for BitmapScanRegexp(p1_c2): p1_c2_val2
7741-LOG: available indexes for BitmapScanRegexp(p1_c3): p1_c3_val2
7742-LOG: available indexes for BitmapScanRegexp(p1_c4): p1_c4_val2
7743-LOG: available indexes for BitmapScanRegexp(p1_c1_c1): p1_c1_c1_val2
7744-LOG: available indexes for BitmapScanRegexp(p1_c1_c2): p1_c1_c2_val2
7745-LOG: available indexes for BitmapScanRegexp(p1_c3_c1): p1_c3_c1_val2
7746-LOG: available indexes for BitmapScanRegexp(p1_c3_c2): p1_c3_c2_val2
7747-LOG: pg_hint_plan:
7748-used hint:
7749-BitmapScanRegexp(p1 p1_.*val2.*)
7750-not used hint:
7751-duplication hint:
7752-error hint:
7753-
7754- QUERY PLAN
7755-------------------------------------------------------
7756- Result
7757- -> Append
7758- -> Bitmap Heap Scan on p1
7759- Recheck Cond: (val = 1)
7760- -> Bitmap Index Scan on p1_val2
7761- Index Cond: (val = 1)
7762- -> Bitmap Heap Scan on p1_c1 p1
7763- Recheck Cond: (val = 1)
7764- -> Bitmap Index Scan on p1_c1_val2
7765- Index Cond: (val = 1)
7766- -> Bitmap Heap Scan on p1_c2 p1
7767- Recheck Cond: (val = 1)
7768- -> Bitmap Index Scan on p1_c2_val2
7769- Index Cond: (val = 1)
7770- -> Bitmap Heap Scan on p1_c3 p1
7771- Recheck Cond: (val = 1)
7772- -> Bitmap Index Scan on p1_c3_val2
7773- Index Cond: (val = 1)
7774- -> Bitmap Heap Scan on p1_c4 p1
7775- Recheck Cond: (val = 1)
7776- -> Bitmap Index Scan on p1_c4_val2
7777- Index Cond: (val = 1)
7778- -> Bitmap Heap Scan on p1_c1_c1 p1
7779- Recheck Cond: (val = 1)
7780- -> Bitmap Index Scan on p1_c1_c1_val2
7781- Index Cond: (val = 1)
7782- -> Bitmap Heap Scan on p1_c1_c2 p1
7783- Recheck Cond: (val = 1)
7784- -> Bitmap Index Scan on p1_c1_c2_val2
7785- Index Cond: (val = 1)
7786- -> Bitmap Heap Scan on p1_c3_c1 p1
7787- Recheck Cond: (val = 1)
7788- -> Bitmap Index Scan on p1_c3_c1_val2
7789- Index Cond: (val = 1)
7790- -> Bitmap Heap Scan on p1_c3_c2 p1
7791- Recheck Cond: (val = 1)
7792- -> Bitmap Index Scan on p1_c3_c2_val2
7793- Index Cond: (val = 1)
7794-(38 rows)
7795-
7796-/*+ BitmapScanRegexp(p1 p1[^_].*)*/
7797-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7798-LOG: available indexes for BitmapScanRegexp(p1):
7799-LOG: available indexes for BitmapScanRegexp(p1_c1):
7800-LOG: available indexes for BitmapScanRegexp(p1_c2):
7801-LOG: available indexes for BitmapScanRegexp(p1_c3):
7802-LOG: available indexes for BitmapScanRegexp(p1_c4):
7803-LOG: available indexes for BitmapScanRegexp(p1_c1_c1):
7804-LOG: available indexes for BitmapScanRegexp(p1_c1_c2):
7805-LOG: available indexes for BitmapScanRegexp(p1_c3_c1):
7806-LOG: available indexes for BitmapScanRegexp(p1_c3_c2):
7807-LOG: pg_hint_plan:
7808-used hint:
7809-BitmapScanRegexp(p1 p1[^_].*)
7810-not used hint:
7811-duplication hint:
7812-error hint:
7813-
7814- QUERY PLAN
7815--------------------------------------
7816- Result
7817- -> Append
7818- -> Seq Scan on p1
7819- Filter: (val = 1)
7820- -> Seq Scan on p1_c1 p1
7821- Filter: (val = 1)
7822- -> Seq Scan on p1_c2 p1
7823- Filter: (val = 1)
7824- -> Seq Scan on p1_c3 p1
7825- Filter: (val = 1)
7826- -> Seq Scan on p1_c4 p1
7827- Filter: (val = 1)
7828- -> Seq Scan on p1_c1_c1 p1
7829- Filter: (val = 1)
7830- -> Seq Scan on p1_c1_c2 p1
7831- Filter: (val = 1)
7832- -> Seq Scan on p1_c3_c1 p1
7833- Filter: (val = 1)
7834- -> Seq Scan on p1_c3_c2 p1
7835- Filter: (val = 1)
7836-(20 rows)
7837-
7838-/*+ BitmapScan(p1 p1_.*val2.*)*/
7839-EXPLAIN (COSTS false) SELECT val FROM p1 WHERE val = 1;
7840-LOG: available indexes for BitmapScan(p1):
7841-LOG: available indexes for BitmapScan(p1_c1):
7842-LOG: available indexes for BitmapScan(p1_c2):
7843-LOG: available indexes for BitmapScan(p1_c3):
7844-LOG: available indexes for BitmapScan(p1_c4):
7845-LOG: available indexes for BitmapScan(p1_c1_c1):
7846-LOG: available indexes for BitmapScan(p1_c1_c2):
7847-LOG: available indexes for BitmapScan(p1_c3_c1):
7848-LOG: available indexes for BitmapScan(p1_c3_c2):
7849-LOG: pg_hint_plan:
7850-used hint:
7851-BitmapScan(p1 p1_.*val2.*)
7852-not used hint:
7853-duplication hint:
7854-error hint:
7855-
7856- QUERY PLAN
7857--------------------------------------
7858- Result
7859- -> Append
7860- -> Seq Scan on p1
7861- Filter: (val = 1)
7862- -> Seq Scan on p1_c1 p1
7863- Filter: (val = 1)
7864- -> Seq Scan on p1_c2 p1
7865- Filter: (val = 1)
7866- -> Seq Scan on p1_c3 p1
7867- Filter: (val = 1)
7868- -> Seq Scan on p1_c4 p1
7869- Filter: (val = 1)
7870- -> Seq Scan on p1_c1_c1 p1
7871- Filter: (val = 1)
7872- -> Seq Scan on p1_c1_c2 p1
7873- Filter: (val = 1)
7874- -> Seq Scan on p1_c3_c1 p1
7875- Filter: (val = 1)
7876- -> Seq Scan on p1_c3_c2 p1
7877- Filter: (val = 1)
7878-(20 rows)
7879-
7880--- search from hint table
7881-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?;', '', 'SeqScan(t1)');
7882-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN (COSTS false) SELECT id FROM t1 WHERE t1.id = ?;', '', 'IndexScan(t1)');
7883-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints) VALUES ('EXPLAIN SELECT * FROM t1 WHERE t1.id = ?;', '', 'BitmapScan(t1)');
7884-SELECT * FROM hint_plan.hints ORDER BY id;
7885- id | norm_query_string | application_name | hints
7886-----+----------------------------------------------------------+------------------+----------------
7887- 1 | EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = ?; | | SeqScan(t1)
7888- 2 | EXPLAIN (COSTS false) SELECT id FROM t1 WHERE t1.id = ?; | | IndexScan(t1)
7889- 3 | EXPLAIN SELECT * FROM t1 WHERE t1.id = ?; | | BitmapScan(t1)
7890-(3 rows)
7891-
7892-SET pg_hint_plan.enable_hint_table = on;
7893-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = 1;
7894-LOG: pg_hint_plan:
7895-used hint:
7896-SeqScan(t1)
7897-not used hint:
7898-duplication hint:
7899-error hint:
7900-
7901- QUERY PLAN
7902---------------------
7903- Seq Scan on t1
7904- Filter: (id = 1)
7905-(2 rows)
7906-
7907-SET pg_hint_plan.enable_hint_table = off;
7908-EXPLAIN (COSTS false) SELECT * FROM t1 WHERE t1.id = 1;
7909- QUERY PLAN
7910---------------------------------
7911- Index Scan using t1_pkey on t1
7912- Index Cond: (id = 1)
7913-(2 rows)
7914-
7915-TRUNCATE hint_plan.hints;
7916-VACUUM ANALYZE hint_plan.hints;
7917--- plpgsql test
7918-EXPLAIN (COSTS false) SELECT id FROM t1 WHERE t1.id = 1;
7919- QUERY PLAN
7920---------------------------------
7921- Index Scan using t1_pkey on t1
7922- Index Cond: (id = 1)
7923-(2 rows)
7924-
7925-DO LANGUAGE plpgsql $$
7926-DECLARE
7927- id integer;
7928-BEGIN
7929- SELECT /*+SeqScan(t1)*/ t1.id INTO id FROM t1 WHERE t1.id = 1;
7930- RETURN;
7931-END;
7932-$$;
7933-LOG: pg_hint_plan:
7934-used hint:
7935-SeqScan(t1)
7936-not used hint:
7937-duplication hint:
7938-error hint:
7939-
7940-CONTEXT: SQL statement "SELECT /*+SeqScan(t1)*/ t1.id FROM t1 WHERE t1.id = 1"
7941-PL/pgSQL function "inline_code_block" line 5 at SQL statement
7942-DROP EXTENSION pg_hint_plan;
--- a/expected/ut-A-9.1.out
+++ /dev/null
@@ -1,4527 +0,0 @@
1-LOAD 'pg_hint_plan';
2-SET pg_hint_plan.enable_hint TO on;
3-SET pg_hint_plan.debug_print TO on;
4-SET client_min_messages TO LOG;
5-SET search_path TO public;
6-----
7----- No.A-1-1 install
8----- No.A-2-1 uninstall
9-----
10--- No.A-1-1-3
11-CREATE EXTENSION pg_hint_plan;
12--- No.A-1-2-3
13-DROP EXTENSION pg_hint_plan;
14--- No.A-1-1-4
15-CREATE EXTENSION pg_hint_plan SCHEMA other_name;
16-ERROR: extension "pg_hint_plan" must be installed in schema "hint_plan"
17-CREATE EXTENSION pg_hint_plan;
18-----
19----- No. A-5-1 comment pattern
20-----
21--- No. A-5-1-1
22-/*+SeqScan(t1)*/
23-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
24-LOG: pg_hint_plan:
25-used hint:
26-SeqScan(t1)
27-not used hint:
28-duplication hint:
29-error hint:
30-
31- QUERY PLAN
32---------------------
33- Seq Scan on t1
34- Filter: (c1 = 1)
35-(2 rows)
36-
37--- No. A-5-1-2
38-/* +SeqScan(t1)*/
39-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
40- QUERY PLAN
41-------------------------------
42- Index Scan using t1_i1 on t1
43- Index Cond: (c1 = 1)
44-(2 rows)
45-
46--- No. A-5-1-3
47-/*SeqScan(t1)*/
48-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
49- QUERY PLAN
50-------------------------------
51- Index Scan using t1_i1 on t1
52- Index Cond: (c1 = 1)
53-(2 rows)
54-
55--- No. A-5-1-4
56---+SeqScan(t1)
57-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
58- QUERY PLAN
59-------------------------------
60- Index Scan using t1_i1 on t1
61- Index Cond: (c1 = 1)
62-(2 rows)
63-
64--- No. A-5-1-5
65-/* /*+SeqScan(t1)*/ */
66-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
67- QUERY PLAN
68-------------------------------
69- Index Scan using t1_i1 on t1
70- Index Cond: (c1 = 1)
71-(2 rows)
72-
73-----
74----- No. A-5-2 hint position
75-----
76--- No. A-5-2-1
77-EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
78- QUERY PLAN
79-------------------------------
80- Index Scan using t1_i1 on t1
81- Index Cond: (c1 = 1)
82-(2 rows)
83-
84-/*+SeqScan(t1)*/
85-EXPLAIN (COSTS false) SELECT c1 FROM s1.t1 WHERE t1.c1 = 1;
86-LOG: pg_hint_plan:
87-used hint:
88-SeqScan(t1)
89-not used hint:
90-duplication hint:
91-error hint:
92-
93- QUERY PLAN
94---------------------
95- Seq Scan on t1
96- Filter: (c1 = 1)
97-(2 rows)
98-
99--- No. A-5-2-2
100-EXPLAIN (COSTS false) SELECT c1, c2 AS c_2 /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
101-LOG: pg_hint_plan:
102-used hint:
103-SeqScan(t1)
104-not used hint:
105-duplication hint:
106-error hint:
107-
108- QUERY PLAN
109---------------------
110- Seq Scan on t1
111- Filter: (c1 = 1)
112-(2 rows)
113-
114--- No. A-5-2-3
115-EXPLAIN (COSTS false) SELECT c1 AS "c1"/*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
116- QUERY PLAN
117-------------------------------
118- Index Scan using t1_i1 on t1
119- Index Cond: (c1 = 1)
120-(2 rows)
121-
122--- No. A-5-2-4
123-EXPLAIN (COSTS false) SELECT * /*+SeqScan(t1)*/ FROM s1.t1 WHERE t1.c1 = 1;
124- QUERY PLAN
125-------------------------------
126- Index Scan using t1_i1 on t1
127- Index Cond: (c1 = 1)
128-(2 rows)
129-
130-----
131----- No. A-6-1 hint's table definition
132-----
133-SET pg_hint_plan.enable_hint_table TO on;
134--- No. A-6-1-1
135-\d hint_plan.hints
136- Table "hint_plan.hints"
137- Column | Type | Modifiers
138--------------------+---------+--------------------------------------------------------------
139- id | integer | not null default nextval('hint_plan.hints_id_seq'::regclass)
140- norm_query_string | text | not null
141- application_name | text | not null
142- hints | text | not null
143-Indexes:
144- "hints_pkey" PRIMARY KEY, btree (id)
145- "hints_norm_and_app" UNIQUE, btree (norm_query_string, application_name)
146-
147-----
148----- No. A-6-2 search condition
149-----
150-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
151- QUERY PLAN
152-------------------------------
153- Index Scan using t1_i1 on t1
154- Index Cond: (c1 = 1)
155-(2 rows)
156-
157--- No. A-6-2-1
158-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
159- VALUES (
160- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
161- '',
162- 'SeqScan(t1)');
163-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
164-LOG: pg_hint_plan:
165-used hint:
166-SeqScan(t1)
167-not used hint:
168-duplication hint:
169-error hint:
170-
171- QUERY PLAN
172---------------------
173- Seq Scan on t1
174- Filter: (c1 = 1)
175-(2 rows)
176-
177--- No. A-6-2-2
178-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
179- VALUES (
180- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
181- 'psql',
182- 'BitmapScan(t1)');
183-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
184-LOG: pg_hint_plan:
185-used hint:
186-BitmapScan(t1)
187-not used hint:
188-duplication hint:
189-error hint:
190-
191- QUERY PLAN
192-----------------------------------
193- Bitmap Heap Scan on t1
194- Recheck Cond: (c1 = 1)
195- -> Bitmap Index Scan on t1_i1
196- Index Cond: (c1 = 1)
197-(4 rows)
198-
199-TRUNCATE hint_plan.hints;
200--- No. A-6-2-3
201-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
202- VALUES (
203- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
204- 'dummy_application_name',
205- 'SeqScan(t1)'
206-);
207-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
208- QUERY PLAN
209-------------------------------
210- Index Scan using t1_i1 on t1
211- Index Cond: (c1 = 1)
212-(2 rows)
213-
214-TRUNCATE hint_plan.hints;
215--- No. A-6-2-4
216-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
217- VALUES (
218- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1;',
219- '',
220- 'SeqScan(t1)'
221-);
222-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
223- QUERY PLAN
224-------------------------------
225- Index Scan using t1_i1 on t1
226- Index Cond: (c1 = 1)
227-(2 rows)
228-
229-TRUNCATE hint_plan.hints;
230-----
231----- No. A-6-3 number of constant
232-----
233--- No. A-6-3-1
234-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
235- VALUES (
236- 'EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;',
237- '',
238- 'SeqScan(t1)'
239-);
240-EXPLAIN (COSTS false) SELECT c1 FROM s1.t1;
241-LOG: pg_hint_plan:
242-used hint:
243-SeqScan(t1)
244-not used hint:
245-duplication hint:
246-error hint:
247-
248- QUERY PLAN
249-----------------
250- Seq Scan on t1
251-(1 row)
252-
253-TRUNCATE hint_plan.hints;
254--- No. A-6-3-2
255-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
256- VALUES (
257- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
258- '',
259- 'SeqScan(t1)'
260-);
261-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
262-LOG: pg_hint_plan:
263-used hint:
264-SeqScan(t1)
265-not used hint:
266-duplication hint:
267-error hint:
268-
269- QUERY PLAN
270---------------------
271- Seq Scan on t1
272- Filter: (c1 = 1)
273-(2 rows)
274-
275-TRUNCATE hint_plan.hints;
276--- No. A-6-3-3
277-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
278- VALUES (
279- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ? OR t1.c1 = ?;',
280- '',
281- 'SeqScan(t1)'
282-);
283-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 OR t1.c1 = 0;
284-LOG: pg_hint_plan:
285-used hint:
286-SeqScan(t1)
287-not used hint:
288-duplication hint:
289-error hint:
290-
291- QUERY PLAN
292-----------------------------------
293- Seq Scan on t1
294- Filter: ((c1 = 1) OR (c1 = 0))
295-(2 rows)
296-
297-TRUNCATE hint_plan.hints;
298-SET pg_hint_plan.enable_hint_table TO off;
299-----
300----- No. A-7-2 hint delimiter
301-----
302-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
303- QUERY PLAN
304-------------------------------
305- Index Scan using t1_i1 on t1
306- Index Cond: (c1 = 1)
307-(2 rows)
308-
309--- No. A-7-2-1
310--- No. A-7-2-2
311--- No. A-7-2-3
312--- No. A-7-2-4
313--- No. A-7-2-5
314--- No. A-7-2-6
315--- No. A-7-2-7
316-/*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
317-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
318-LOG: pg_hint_plan:
319-used hint:
320-Set(enable_bitmapscan off)
321-Set(enable_indexscan off)
322-not used hint:
323-duplication hint:
324-error hint:
325-
326- QUERY PLAN
327---------------------
328- Seq Scan on t1
329- Filter: (c1 = 1)
330-(2 rows)
331-
332--- No. A-7-2-8
333-/*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
334-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
335-LOG: pg_hint_plan:
336-used hint:
337-Set(enable_bitmapscan off)
338-Set(enable_indexscan off)
339-not used hint:
340-duplication hint:
341-error hint:
342-
343- QUERY PLAN
344---------------------
345- Seq Scan on t1
346- Filter: (c1 = 1)
347-(2 rows)
348-
349--- No. A-7-2-9
350-/*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
351-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
352-LOG: pg_hint_plan:
353-used hint:
354-Set(enable_bitmapscan off)
355-Set(enable_indexscan off)
356-not used hint:
357-duplication hint:
358-error hint:
359-
360- QUERY PLAN
361---------------------
362- Seq Scan on t1
363- Filter: (c1 = 1)
364-(2 rows)
365-
366--- No. A-7-2-10
367-/*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
368-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
369-LOG: pg_hint_plan:
370-used hint:
371-Set(enable_bitmapscan off)
372-Set(enable_indexscan off)
373-not used hint:
374-duplication hint:
375-error hint:
376-
377- QUERY PLAN
378---------------------
379- Seq Scan on t1
380- Filter: (c1 = 1)
381-(2 rows)
382-
383--- No. A-7-2-11
384-/*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
385-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
386-LOG: pg_hint_plan:
387-used hint:
388-Set(enable_bitmapscan off)
389-Set(enable_indexscan off)
390-not used hint:
391-duplication hint:
392-error hint:
393-
394- QUERY PLAN
395---------------------
396- Seq Scan on t1
397- Filter: (c1 = 1)
398-(2 rows)
399-
400--- No. A-7-2-12
401-/*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
402-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
403-LOG: pg_hint_plan:
404-used hint:
405-Set(enable_bitmapscan off)
406-Set(enable_indexscan off)
407-not used hint:
408-duplication hint:
409-error hint:
410-
411- QUERY PLAN
412---------------------
413- Seq Scan on t1
414- Filter: (c1 = 1)
415-(2 rows)
416-
417--- No. A-7-2-13
418-/*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
419-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
420-LOG: pg_hint_plan:
421-used hint:
422-Set(enable_bitmapscan off)
423-Set(enable_indexscan off)
424-not used hint:
425-duplication hint:
426-error hint:
427-
428- QUERY PLAN
429---------------------
430- Seq Scan on t1
431- Filter: (c1 = 1)
432-(2 rows)
433-
434--- No. A-7-2-14
435-/*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
436-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
437-LOG: pg_hint_plan:
438-used hint:
439-Set(enable_bitmapscan off)
440-Set(enable_indexscan off)
441-not used hint:
442-duplication hint:
443-error hint:
444-
445- QUERY PLAN
446---------------------
447- Seq Scan on t1
448- Filter: (c1 = 1)
449-(2 rows)
450-
451--- No. A-7-2-15
452-/*+ Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
453-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
454-LOG: pg_hint_plan:
455-used hint:
456-Set(enable_bitmapscan off)
457-Set(enable_indexscan off)
458-not used hint:
459-duplication hint:
460-error hint:
461-
462- QUERY PLAN
463---------------------
464- Seq Scan on t1
465- Filter: (c1 = 1)
466-(2 rows)
467-
468--- No. A-7-2-16
469-/*+Set(enable_indexscan"off")Set(enable_bitmapscan"off") */
470-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
471-LOG: pg_hint_plan:
472-used hint:
473-Set(enable_bitmapscan off)
474-Set(enable_indexscan off)
475-not used hint:
476-duplication hint:
477-error hint:
478-
479- QUERY PLAN
480---------------------
481- Seq Scan on t1
482- Filter: (c1 = 1)
483-(2 rows)
484-
485--- No. A-7-2-17
486-/*+ Set (enable_indexscan"off") Set (enable_bitmapscan"off")*/
487-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
488-LOG: pg_hint_plan:
489-used hint:
490-Set(enable_bitmapscan off)
491-Set(enable_indexscan off)
492-not used hint:
493-duplication hint:
494-error hint:
495-
496- QUERY PLAN
497---------------------
498- Seq Scan on t1
499- Filter: (c1 = 1)
500-(2 rows)
501-
502--- No. A-7-2-18
503-/*+Set ( enable_indexscan"off")Set ( enable_bitmapscan"off")*/
504-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
505-LOG: pg_hint_plan:
506-used hint:
507-Set(enable_bitmapscan off)
508-Set(enable_indexscan off)
509-not used hint:
510-duplication hint:
511-error hint:
512-
513- QUERY PLAN
514---------------------
515- Seq Scan on t1
516- Filter: (c1 = 1)
517-(2 rows)
518-
519--- No. A-7-2-19
520-/*+Set(enable_indexscan"off" ) Set(enable_bitmapscan"off" ) */
521-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
522-LOG: pg_hint_plan:
523-used hint:
524-Set(enable_bitmapscan off)
525-Set(enable_indexscan off)
526-not used hint:
527-duplication hint:
528-error hint:
529-
530- QUERY PLAN
531---------------------
532- Seq Scan on t1
533- Filter: (c1 = 1)
534-(2 rows)
535-
536--- No. A-7-2-20
537-/*+Set( enable_indexscan "off" )Set( enable_bitmapscan "off" )*/
538-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
539-LOG: pg_hint_plan:
540-used hint:
541-Set(enable_bitmapscan off)
542-Set(enable_indexscan off)
543-not used hint:
544-duplication hint:
545-error hint:
546-
547- QUERY PLAN
548---------------------
549- Seq Scan on t1
550- Filter: (c1 = 1)
551-(2 rows)
552-
553--- No. A-7-2-21
554-/*+ Set ( enable_indexscan "off" ) Set ( enable_bitmapscan "off" ) */
555-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
556-LOG: pg_hint_plan:
557-used hint:
558-Set(enable_bitmapscan off)
559-Set(enable_indexscan off)
560-not used hint:
561-duplication hint:
562-error hint:
563-
564- QUERY PLAN
565---------------------
566- Seq Scan on t1
567- Filter: (c1 = 1)
568-(2 rows)
569-
570--- No. A-7-2-22
571-/*+
572-Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
573-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
574-LOG: pg_hint_plan:
575-used hint:
576-Set(enable_bitmapscan off)
577-Set(enable_indexscan off)
578-not used hint:
579-duplication hint:
580-error hint:
581-
582- QUERY PLAN
583---------------------
584- Seq Scan on t1
585- Filter: (c1 = 1)
586-(2 rows)
587-
588--- No. A-7-2-23
589-/*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
590-*/
591-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
592-LOG: pg_hint_plan:
593-used hint:
594-Set(enable_bitmapscan off)
595-Set(enable_indexscan off)
596-not used hint:
597-duplication hint:
598-error hint:
599-
600- QUERY PLAN
601---------------------
602- Seq Scan on t1
603- Filter: (c1 = 1)
604-(2 rows)
605-
606--- No. A-7-2-24
607-/*+
608-Set
609-(enable_indexscan"off")
610-Set
611-(enable_bitmapscan"off")*/
612-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
613-LOG: pg_hint_plan:
614-used hint:
615-Set(enable_bitmapscan off)
616-Set(enable_indexscan off)
617-not used hint:
618-duplication hint:
619-error hint:
620-
621- QUERY PLAN
622---------------------
623- Seq Scan on t1
624- Filter: (c1 = 1)
625-(2 rows)
626-
627--- No. A-7-2-25
628-/*+Set
629-(
630-enable_indexscan"off")Set
631-(
632-enable_bitmapscan"off")*/
633-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
634-LOG: pg_hint_plan:
635-used hint:
636-Set(enable_bitmapscan off)
637-Set(enable_indexscan off)
638-not used hint:
639-duplication hint:
640-error hint:
641-
642- QUERY PLAN
643---------------------
644- Seq Scan on t1
645- Filter: (c1 = 1)
646-(2 rows)
647-
648--- No. A-7-2-26
649-/*+Set(enable_indexscan"off"
650-)
651-Set(enable_bitmapscan"off"
652-)
653-*/
654-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
655-LOG: pg_hint_plan:
656-used hint:
657-Set(enable_bitmapscan off)
658-Set(enable_indexscan off)
659-not used hint:
660-duplication hint:
661-error hint:
662-
663- QUERY PLAN
664---------------------
665- Seq Scan on t1
666- Filter: (c1 = 1)
667-(2 rows)
668-
669--- No. A-7-2-27
670-/*+Set(
671-enable_indexscan
672-"off"
673-)Set(
674-enable_bitmapscan
675-"off"
676-)*/
677-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
678-LOG: pg_hint_plan:
679-used hint:
680-Set(enable_bitmapscan off)
681-Set(enable_indexscan off)
682-not used hint:
683-duplication hint:
684-error hint:
685-
686- QUERY PLAN
687---------------------
688- Seq Scan on t1
689- Filter: (c1 = 1)
690-(2 rows)
691-
692--- No. A-7-2-28
693-/*+
694-Set
695-(
696-enable_indexscan
697-"off"
698-)
699-Set
700-(
701-enable_bitmapscan
702-"off"
703-)
704-*/
705-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
706-LOG: pg_hint_plan:
707-used hint:
708-Set(enable_bitmapscan off)
709-Set(enable_indexscan off)
710-not used hint:
711-duplication hint:
712-error hint:
713-
714- QUERY PLAN
715---------------------
716- Seq Scan on t1
717- Filter: (c1 = 1)
718-(2 rows)
719-
720--- No. A-7-2-29
721-/*+
722- Set(enable_indexscan"off")Set(enable_bitmapscan"off")*/
723-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
724-LOG: pg_hint_plan:
725-used hint:
726-Set(enable_bitmapscan off)
727-Set(enable_indexscan off)
728-not used hint:
729-duplication hint:
730-error hint:
731-
732- QUERY PLAN
733---------------------
734- Seq Scan on t1
735- Filter: (c1 = 1)
736-(2 rows)
737-
738--- No. A-7-2-30
739-/*+Set(enable_indexscan"off")Set(enable_bitmapscan"off")
740- */
741-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
742-LOG: pg_hint_plan:
743-used hint:
744-Set(enable_bitmapscan off)
745-Set(enable_indexscan off)
746-not used hint:
747-duplication hint:
748-error hint:
749-
750- QUERY PLAN
751---------------------
752- Seq Scan on t1
753- Filter: (c1 = 1)
754-(2 rows)
755-
756--- No. A-7-2-31
757-/*+
758- Set
759- (enable_indexscan"off")
760- Set
761- (enable_bitmapscan"off")*/
762-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
763-LOG: pg_hint_plan:
764-used hint:
765-Set(enable_bitmapscan off)
766-Set(enable_indexscan off)
767-not used hint:
768-duplication hint:
769-error hint:
770-
771- QUERY PLAN
772---------------------
773- Seq Scan on t1
774- Filter: (c1 = 1)
775-(2 rows)
776-
777--- No. A-7-2-32
778-/*+Set
779- (
780- enable_indexscan"off")Set
781- (
782- enable_bitmapscan"off")*/
783-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
784-LOG: pg_hint_plan:
785-used hint:
786-Set(enable_bitmapscan off)
787-Set(enable_indexscan off)
788-not used hint:
789-duplication hint:
790-error hint:
791-
792- QUERY PLAN
793---------------------
794- Seq Scan on t1
795- Filter: (c1 = 1)
796-(2 rows)
797-
798--- No. A-7-2-33
799-/*+Set(enable_indexscan"off"
800- )
801- Set(enable_bitmapscan"off"
802- )
803- */
804-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
805-LOG: pg_hint_plan:
806-used hint:
807-Set(enable_bitmapscan off)
808-Set(enable_indexscan off)
809-not used hint:
810-duplication hint:
811-error hint:
812-
813- QUERY PLAN
814---------------------
815- Seq Scan on t1
816- Filter: (c1 = 1)
817-(2 rows)
818-
819--- No. A-7-2-34
820-/*+Set(
821- enable_indexscan
822- "off"
823- )Set(
824- enable_bitmapscan
825- "off"
826- )*/
827-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
828-LOG: pg_hint_plan:
829-used hint:
830-Set(enable_bitmapscan off)
831-Set(enable_indexscan off)
832-not used hint:
833-duplication hint:
834-error hint:
835-
836- QUERY PLAN
837---------------------
838- Seq Scan on t1
839- Filter: (c1 = 1)
840-(2 rows)
841-
842--- No. A-7-2-35
843-/*+
844- Set
845- (
846- enable_indexscan
847- "off"
848- )
849- Set
850- (
851- enable_bitmapscan
852- "off"
853- )
854- */
855-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
856-LOG: pg_hint_plan:
857-used hint:
858-Set(enable_bitmapscan off)
859-Set(enable_indexscan off)
860-not used hint:
861-duplication hint:
862-error hint:
863-
864- QUERY PLAN
865---------------------
866- Seq Scan on t1
867- Filter: (c1 = 1)
868-(2 rows)
869-
870-----
871----- No. A-7-3 hint object pattern
872----- No. A-9-2 message object pattern
873-----
874--- No. A-7-3-1
875--- No. A-9-2-1
876-/*+SeqScan(t)*/
877-EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
878-LOG: pg_hint_plan:
879-used hint:
880-SeqScan(t)
881-not used hint:
882-duplication hint:
883-error hint:
884-
885- QUERY PLAN
886---------------------
887- Seq Scan on t1 t
888- Filter: (c1 = 1)
889-(2 rows)
890-
891-/*+SeqScan(ttt)*/
892-EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
893-LOG: pg_hint_plan:
894-used hint:
895-SeqScan(ttt)
896-not used hint:
897-duplication hint:
898-error hint:
899-
900- QUERY PLAN
901---------------------
902- Seq Scan on t1 ttt
903- Filter: (c1 = 1)
904-(2 rows)
905-
906-/*+SeqScan("t")*/
907-EXPLAIN (COSTS false) SELECT * FROM s1.t1 t WHERE t.c1 = 1;
908-LOG: pg_hint_plan:
909-used hint:
910-SeqScan(t)
911-not used hint:
912-duplication hint:
913-error hint:
914-
915- QUERY PLAN
916---------------------
917- Seq Scan on t1 t
918- Filter: (c1 = 1)
919-(2 rows)
920-
921-/*+SeqScan("ttt")*/
922-EXPLAIN (COSTS false) SELECT * FROM s1.t1 ttt WHERE ttt.c1 = 1;
923-LOG: pg_hint_plan:
924-used hint:
925-SeqScan(ttt)
926-not used hint:
927-duplication hint:
928-error hint:
929-
930- QUERY PLAN
931---------------------
932- Seq Scan on t1 ttt
933- Filter: (c1 = 1)
934-(2 rows)
935-
936--- No. A-7-3-2
937--- No. A-9-2-2
938-/*+SeqScan(T)*/
939-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
940-LOG: pg_hint_plan:
941-used hint:
942-SeqScan(T)
943-not used hint:
944-duplication hint:
945-error hint:
946-
947- QUERY PLAN
948---------------------
949- Seq Scan on t1 "T"
950- Filter: (c1 = 1)
951-(2 rows)
952-
953-/*+SeqScan(TTT)*/
954-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
955-LOG: pg_hint_plan:
956-used hint:
957-SeqScan(TTT)
958-not used hint:
959-duplication hint:
960-error hint:
961-
962- QUERY PLAN
963-----------------------
964- Seq Scan on t1 "TTT"
965- Filter: (c1 = 1)
966-(2 rows)
967-
968-/*+SeqScan("T")*/
969-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "T" WHERE "T".c1 = 1;
970-LOG: pg_hint_plan:
971-used hint:
972-SeqScan(T)
973-not used hint:
974-duplication hint:
975-error hint:
976-
977- QUERY PLAN
978---------------------
979- Seq Scan on t1 "T"
980- Filter: (c1 = 1)
981-(2 rows)
982-
983-/*+SeqScan("TTT")*/
984-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "TTT" WHERE "TTT".c1 = 1;
985-LOG: pg_hint_plan:
986-used hint:
987-SeqScan(TTT)
988-not used hint:
989-duplication hint:
990-error hint:
991-
992- QUERY PLAN
993-----------------------
994- Seq Scan on t1 "TTT"
995- Filter: (c1 = 1)
996-(2 rows)
997-
998--- No. A-7-3-3
999--- No. A-9-2-3
1000-/*+SeqScan(()*/
1001-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1002-INFO: hint syntax error at or near "()"
1003-DETAIL: Zero-length delimited string.
1004- QUERY PLAN
1005-----------------------------------
1006- Index Scan using t1_i1 on t1 "("
1007- Index Cond: (c1 = 1)
1008-(2 rows)
1009-
1010-/*+SeqScan("(")*/
1011-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "(" WHERE "(".c1 = 1;
1012-LOG: pg_hint_plan:
1013-used hint:
1014-SeqScan("(")
1015-not used hint:
1016-duplication hint:
1017-error hint:
1018-
1019- QUERY PLAN
1020---------------------
1021- Seq Scan on t1 "("
1022- Filter: (c1 = 1)
1023-(2 rows)
1024-
1025--- No. A-7-3-4
1026--- No. A-9-2-4
1027-/*+SeqScan())*/
1028-EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1029-INFO: hint syntax error at or near ")"
1030-DETAIL: SeqScan hint requires a relation.
1031-INFO: hint syntax error at or near ")"
1032-DETAIL: Unrecognized hint keyword ")".
1033-LOG: pg_hint_plan:
1034-used hint:
1035-not used hint:
1036-duplication hint:
1037-error hint:
1038-SeqScan()
1039-
1040- QUERY PLAN
1041-----------------------------------
1042- Index Scan using t1_i1 on t1 ")"
1043- Index Cond: (c1 = 1)
1044-(2 rows)
1045-
1046-/*+SeqScan(")")*/
1047-EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")" WHERE ")".c1 = 1;
1048-LOG: pg_hint_plan:
1049-used hint:
1050-SeqScan(")")
1051-not used hint:
1052-duplication hint:
1053-error hint:
1054-
1055- QUERY PLAN
1056---------------------
1057- Seq Scan on t1 ")"
1058- Filter: (c1 = 1)
1059-(2 rows)
1060-
1061-/*+SeqScan(")))")*/
1062-EXPLAIN (COSTS false) SELECT * FROM s1.t1 ")))" WHERE ")))".c1 = 1;
1063-LOG: pg_hint_plan:
1064-used hint:
1065-SeqScan(")))")
1066-not used hint:
1067-duplication hint:
1068-error hint:
1069-
1070- QUERY PLAN
1071-----------------------
1072- Seq Scan on t1 ")))"
1073- Filter: (c1 = 1)
1074-(2 rows)
1075-
1076--- No. A-7-3-5
1077--- No. A-9-2-5
1078-/*+SeqScan(")*/
1079-EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1080-INFO: hint syntax error at or near ""
1081-DETAIL: Unterminated quoted string.
1082- QUERY PLAN
1083------------------------------------
1084- Index Scan using t1_i1 on t1 """"
1085- Index Cond: (c1 = 1)
1086-(2 rows)
1087-
1088-/*+SeqScan("""")*/
1089-EXPLAIN (COSTS false) SELECT * FROM s1.t1 """" WHERE """".c1 = 1;
1090-LOG: pg_hint_plan:
1091-used hint:
1092-SeqScan("""")
1093-not used hint:
1094-duplication hint:
1095-error hint:
1096-
1097- QUERY PLAN
1098----------------------
1099- Seq Scan on t1 """"
1100- Filter: (c1 = 1)
1101-(2 rows)
1102-
1103-/*+SeqScan("""""""")*/
1104-EXPLAIN (COSTS false) SELECT * FROM s1.t1 """""""" WHERE """""""".c1 = 1;
1105-LOG: pg_hint_plan:
1106-used hint:
1107-SeqScan("""""""")
1108-not used hint:
1109-duplication hint:
1110-error hint:
1111-
1112- QUERY PLAN
1113--------------------------
1114- Seq Scan on t1 """"""""
1115- Filter: (c1 = 1)
1116-(2 rows)
1117-
1118--- No. A-7-3-6
1119--- No. A-9-2-6
1120-/*+SeqScan( )*/
1121-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1122-INFO: hint syntax error at or near ""
1123-DETAIL: SeqScan hint requires a relation.
1124-LOG: pg_hint_plan:
1125-used hint:
1126-not used hint:
1127-duplication hint:
1128-error hint:
1129-SeqScan()
1130-
1131- QUERY PLAN
1132-----------------------------------
1133- Index Scan using t1_i1 on t1 " "
1134- Index Cond: (c1 = 1)
1135-(2 rows)
1136-
1137-/*+SeqScan(" ")*/
1138-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1139-LOG: pg_hint_plan:
1140-used hint:
1141-SeqScan(" ")
1142-not used hint:
1143-duplication hint:
1144-error hint:
1145-
1146- QUERY PLAN
1147---------------------
1148- Seq Scan on t1 " "
1149- Filter: (c1 = 1)
1150-(2 rows)
1151-
1152-/*+SeqScan(" ")*/
1153-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1154-LOG: pg_hint_plan:
1155-used hint:
1156-SeqScan(" ")
1157-not used hint:
1158-duplication hint:
1159-error hint:
1160-
1161- QUERY PLAN
1162-----------------------
1163- Seq Scan on t1 " "
1164- Filter: (c1 = 1)
1165-(2 rows)
1166-
1167--- No. A-7-3-7
1168--- No. A-9-2-7
1169-/*+SeqScan( )*/
1170-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1171-INFO: hint syntax error at or near ""
1172-DETAIL: SeqScan hint requires a relation.
1173-LOG: pg_hint_plan:
1174-used hint:
1175-not used hint:
1176-duplication hint:
1177-error hint:
1178-SeqScan()
1179-
1180- QUERY PLAN
1181------------------------------------
1182- Index Scan using t1_i1 on t1 " "
1183- Index Cond: (c1 = 1)
1184-(2 rows)
1185-
1186-/*+SeqScan(" ")*/
1187-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1188-LOG: pg_hint_plan:
1189-used hint:
1190-SeqScan(" ")
1191-not used hint:
1192-duplication hint:
1193-error hint:
1194-
1195- QUERY PLAN
1196----------------------------
1197- Seq Scan on t1 " "
1198- Filter: (c1 = 1)
1199-(2 rows)
1200-
1201-/*+SeqScan(" ")*/
1202-EXPLAIN (COSTS false) SELECT * FROM s1.t1 " " WHERE " ".c1 = 1;
1203-LOG: pg_hint_plan:
1204-used hint:
1205-SeqScan(" ")
1206-not used hint:
1207-duplication hint:
1208-error hint:
1209-
1210- QUERY PLAN
1211--------------------------------------------
1212- Seq Scan on t1 " "
1213- Filter: (c1 = 1)
1214-(2 rows)
1215-
1216--- No. A-7-3-8
1217--- No. A-9-2-8
1218-/*+SeqScan(
1219-)*/
1220-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1221-" WHERE "
1222-".c1 = 1;
1223-INFO: hint syntax error at or near ""
1224-DETAIL: SeqScan hint requires a relation.
1225-LOG: pg_hint_plan:
1226-used hint:
1227-not used hint:
1228-duplication hint:
1229-error hint:
1230-SeqScan()
1231-
1232- QUERY PLAN
1233---------------------------------
1234- Index Scan using t1_i1 on t1 "
1235- "
1236- Index Cond: (c1 = 1)
1237-(3 rows)
1238-
1239-/*+SeqScan("
1240-")*/
1241-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1242-" WHERE "
1243-".c1 = 1;
1244-LOG: pg_hint_plan:
1245-used hint:
1246-SeqScan("
1247-")
1248-not used hint:
1249-duplication hint:
1250-error hint:
1251-
1252- QUERY PLAN
1253---------------------
1254- Seq Scan on t1 "
1255- "
1256- Filter: (c1 = 1)
1257-(3 rows)
1258-
1259-/*+SeqScan("
1260-
1261-
1262-")*/
1263-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "
1264-
1265-
1266-" WHERE "
1267-
1268-
1269-".c1 = 1;
1270-LOG: pg_hint_plan:
1271-used hint:
1272-SeqScan("
1273-
1274-
1275-")
1276-not used hint:
1277-duplication hint:
1278-error hint:
1279-
1280- QUERY PLAN
1281---------------------
1282- Seq Scan on t1 "
1283-
1284-
1285- "
1286- Filter: (c1 = 1)
1287-(5 rows)
1288-
1289--- No. A-7-3-9
1290--- No. A-9-2-9
1291-/*+SeqScan(Set)*/
1292-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1293-LOG: pg_hint_plan:
1294-used hint:
1295-SeqScan(Set)
1296-not used hint:
1297-duplication hint:
1298-error hint:
1299-
1300- QUERY PLAN
1301-----------------------
1302- Seq Scan on t1 "Set"
1303- Filter: (c1 = 1)
1304-(2 rows)
1305-
1306-/*+SeqScan("Set")*/
1307-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set" WHERE "Set".c1 = 1;
1308-LOG: pg_hint_plan:
1309-used hint:
1310-SeqScan(Set)
1311-not used hint:
1312-duplication hint:
1313-error hint:
1314-
1315- QUERY PLAN
1316-----------------------
1317- Seq Scan on t1 "Set"
1318- Filter: (c1 = 1)
1319-(2 rows)
1320-
1321-/*+SeqScan("Set SeqScan Leading")*/
1322-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "Set SeqScan Leading" WHERE "Set SeqScan Leading".c1 = 1;
1323-LOG: pg_hint_plan:
1324-used hint:
1325-SeqScan("Set SeqScan Leading")
1326-not used hint:
1327-duplication hint:
1328-error hint:
1329-
1330- QUERY PLAN
1331---------------------------------------
1332- Seq Scan on t1 "Set SeqScan Leading"
1333- Filter: (c1 = 1)
1334-(2 rows)
1335-
1336--- No. A-7-3-10
1337--- No. A-9-2-10
1338-/*+SeqScan(あ)*/
1339-EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1340-LOG: pg_hint_plan:
1341-used hint:
1342-SeqScan(あ)
1343-not used hint:
1344-duplication hint:
1345-error hint:
1346-
1347- QUERY PLAN
1348----------------------
1349- Seq Scan on t1 "あ"
1350- Filter: (c1 = 1)
1351-(2 rows)
1352-
1353-/*+SeqScan(あいう)*/
1354-EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1355-LOG: pg_hint_plan:
1356-used hint:
1357-SeqScan(あいう)
1358-not used hint:
1359-duplication hint:
1360-error hint:
1361-
1362- QUERY PLAN
1363--------------------------
1364- Seq Scan on t1 "あいう"
1365- Filter: (c1 = 1)
1366-(2 rows)
1367-
1368-/*+SeqScan("あ")*/
1369-EXPLAIN (COSTS false) SELECT * FROM s1.t1 あ WHERE あ.c1 = 1;
1370-LOG: pg_hint_plan:
1371-used hint:
1372-SeqScan(あ)
1373-not used hint:
1374-duplication hint:
1375-error hint:
1376-
1377- QUERY PLAN
1378----------------------
1379- Seq Scan on t1 "あ"
1380- Filter: (c1 = 1)
1381-(2 rows)
1382-
1383-/*+SeqScan("あいう")*/
1384-EXPLAIN (COSTS false) SELECT * FROM s1.t1 あいう WHERE あいう.c1 = 1;
1385-LOG: pg_hint_plan:
1386-used hint:
1387-SeqScan(あいう)
1388-not used hint:
1389-duplication hint:
1390-error hint:
1391-
1392- QUERY PLAN
1393--------------------------
1394- Seq Scan on t1 "あいう"
1395- Filter: (c1 = 1)
1396-(2 rows)
1397-
1398--- No. A-7-3-11
1399--- No. A-9-2-11
1400-/*+SeqScan(/**/)*/
1401-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;
1402-INFO: hint syntax error at or near "/**/)*/
1403-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**/" WHERE "/**/".c1 = 1;"
1404-DETAIL: Nested block comments are not supported.
1405- QUERY PLAN
1406--------------------------------------
1407- Index Scan using t1_i1 on t1 "/**/"
1408- Index Cond: (c1 = 1)
1409-(2 rows)
1410-
1411-/*+SeqScan(/**//**//**/)*/
1412-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;
1413-INFO: hint syntax error at or near "/**//**//**/)*/
1414-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "/**//**//**/" WHERE "/**//**//**/".c1 = 1;"
1415-DETAIL: Nested block comments are not supported.
1416- QUERY PLAN
1417----------------------------------------------
1418- Index Scan using t1_i1 on t1 "/**//**//**/"
1419- Index Cond: (c1 = 1)
1420-(2 rows)
1421-
1422--- No. A-7-3-12
1423--- No. A-9-2-12
1424-/*+SeqScan("tT()""
1425-Set/**/あ")*/
1426-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1427-Set/**/あ" WHERE "tT()""
1428-Set/**/あ".c1 = 1;
1429-INFO: hint syntax error at or near "/**/あ")*/
1430-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1431-Set/**/あ" WHERE "tT()""
1432-Set/**/あ".c1 = 1;"
1433-DETAIL: Nested block comments are not supported.
1434- QUERY PLAN
1435-------------------------------------------
1436- Index Scan using t1_i1 on t1 "tT()""
1437- Set/**/あ"
1438- Index Cond: (c1 = 1)
1439-(3 rows)
1440-
1441---"
1442-/*+SeqScan("tT()""
1443-Setあ")*/
1444-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "tT()""
1445-Setあ" WHERE "tT()""
1446-Setあ".c1 = 1;
1447-LOG: pg_hint_plan:
1448-used hint:
1449-SeqScan("tT()""
1450-Setあ")
1451-not used hint:
1452-duplication hint:
1453-error hint:
1454-
1455- QUERY PLAN
1456---------------------------
1457- Seq Scan on t1 "tT()""
1458- Setあ"
1459- Filter: (c1 = 1)
1460-(3 rows)
1461-
1462--- No. A-7-3-13
1463--- No. A-9-2-13
1464-/*+SeqScan(a123456789b123456789c123456789d123456789e123456789f123)*/
1465-EXPLAIN (COSTS false) SELECT * FROM s1.t1 "123456789012345678901234567890123456789012345678901234" WHERE "123456789012345678901234567890123456789012345678901234".c1 = 1;
1466-LOG: pg_hint_plan:
1467-used hint:
1468-not used hint:
1469-SeqScan(a123456789b123456789c123456789d123456789e123456789f123)
1470-duplication hint:
1471-error hint:
1472-
1473- QUERY PLAN
1474----------------------------------------------------------------------------------------
1475- Index Scan using t1_i1 on t1 "123456789012345678901234567890123456789012345678901234"
1476- Index Cond: (c1 = 1)
1477-(2 rows)
1478-
1479-----
1480----- No. A-7-4 hint parse error
1481-----
1482--- No. A-7-4-1
1483-/*+Set(enable_indexscan off)Set enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1484-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1485-INFO: hint syntax error at or near "enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1486-DETAIL: Opening parenthesis is necessary.
1487-LOG: pg_hint_plan:
1488-used hint:
1489-Set(enable_indexscan off)
1490-not used hint:
1491-duplication hint:
1492-error hint:
1493-
1494- QUERY PLAN
1495-----------------------------------
1496- Bitmap Heap Scan on t1
1497- Recheck Cond: (c1 = 1)
1498- -> Bitmap Index Scan on t1_i1
1499- Index Cond: (c1 = 1)
1500-(4 rows)
1501-
1502--- No. A-7-4-2
1503-/*+Set(enable_indexscan off)Set(enable_tidscan off Set(enable_bitmapscan off)SeqScan(t1)*/
1504-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1505-INFO: hint syntax error at or near "(enable_bitmapscan off)SeqScan(t1)"
1506-DETAIL: Zero-length delimited string.
1507-LOG: pg_hint_plan:
1508-used hint:
1509-Set(enable_indexscan off)
1510-not used hint:
1511-duplication hint:
1512-error hint:
1513-
1514- QUERY PLAN
1515-----------------------------------
1516- Bitmap Heap Scan on t1
1517- Recheck Cond: (c1 = 1)
1518- -> Bitmap Index Scan on t1_i1
1519- Index Cond: (c1 = 1)
1520-(4 rows)
1521-
1522--- No. A-7-4-3
1523-/*+Set(enable_indexscan off)Set(enable_tidscan "off)Set(enable_bitmapscan off)SeqScan(t1)*/
1524-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1525-INFO: hint syntax error at or near ""
1526-DETAIL: Unterminated quoted string.
1527-LOG: pg_hint_plan:
1528-used hint:
1529-Set(enable_indexscan off)
1530-not used hint:
1531-duplication hint:
1532-error hint:
1533-
1534- QUERY PLAN
1535-----------------------------------
1536- Bitmap Heap Scan on t1
1537- Recheck Cond: (c1 = 1)
1538- -> Bitmap Index Scan on t1_i1
1539- Index Cond: (c1 = 1)
1540-(4 rows)
1541-
1542--- No. A-7-4-4
1543-/*+Set(enable_indexscan off)SeqScan("")Set(enable_bitmapscan off)*/
1544-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1545-INFO: hint syntax error at or near ")Set(enable_bitmapscan off)"
1546-DETAIL: Zero-length delimited string.
1547-LOG: pg_hint_plan:
1548-used hint:
1549-Set(enable_indexscan off)
1550-not used hint:
1551-duplication hint:
1552-error hint:
1553-
1554- QUERY PLAN
1555-----------------------------------
1556- Bitmap Heap Scan on t1
1557- Recheck Cond: (c1 = 1)
1558- -> Bitmap Index Scan on t1_i1
1559- Index Cond: (c1 = 1)
1560-(4 rows)
1561-
1562--- No. A-7-4-5
1563-/*+Set(enable_indexscan off)NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1564-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1565-INFO: hint syntax error at or near "NoSet(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1566-DETAIL: Unrecognized hint keyword "NoSet".
1567-LOG: pg_hint_plan:
1568-used hint:
1569-Set(enable_indexscan off)
1570-not used hint:
1571-duplication hint:
1572-error hint:
1573-
1574- QUERY PLAN
1575-----------------------------------
1576- Bitmap Heap Scan on t1
1577- Recheck Cond: (c1 = 1)
1578- -> Bitmap Index Scan on t1_i1
1579- Index Cond: (c1 = 1)
1580-(4 rows)
1581-
1582--- No. A-7-4-6
1583-/*+Set(enable_indexscan off)"Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)*/
1584-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1585-INFO: hint syntax error at or near ""Set"(enable_tidscan off)Set(enable_bitmapscan off)SeqScan(t1)"
1586-DETAIL: Unrecognized hint keyword ""Set"".
1587-LOG: pg_hint_plan:
1588-used hint:
1589-Set(enable_indexscan off)
1590-not used hint:
1591-duplication hint:
1592-error hint:
1593-
1594- QUERY PLAN
1595-----------------------------------
1596- Bitmap Heap Scan on t1
1597- Recheck Cond: (c1 = 1)
1598- -> Bitmap Index Scan on t1_i1
1599- Index Cond: (c1 = 1)
1600-(4 rows)
1601-
1602--- No. A-7-4-7
1603-/*+Set(enable_indexscan off)Set(enable_tidscan /* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1604-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1605-INFO: hint syntax error at or near "/* value */off)Set(enable_bitmapscan off)SeqScan(t1)*/
1606-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;"
1607-DETAIL: Nested block comments are not supported.
1608- QUERY PLAN
1609-------------------------------
1610- Index Scan using t1_i1 on t1
1611- Index Cond: (c1 = 1)
1612-(2 rows)
1613-
1614-----
1615----- No. A-8-1 original GUC parameter
1616-----
1617--- No. A-8-1-1
1618-SET ROLE super_user;
1619-SET pg_hint_plan.debug_print TO off;
1620-SHOW pg_hint_plan.enable_hint;
1621- pg_hint_plan.enable_hint
1622---------------------------
1623- on
1624-(1 row)
1625-
1626-SHOW pg_hint_plan.debug_print;
1627- pg_hint_plan.debug_print
1628---------------------------
1629- off
1630-(1 row)
1631-
1632-SHOW pg_hint_plan.parse_messages;
1633- pg_hint_plan.parse_messages
1634------------------------------
1635- info
1636-(1 row)
1637-
1638-SET pg_hint_plan.enable_hint TO off;
1639-SET pg_hint_plan.debug_print TO on;
1640-SET pg_hint_plan.parse_messages TO error;
1641-SHOW pg_hint_plan.enable_hint;
1642- pg_hint_plan.enable_hint
1643---------------------------
1644- off
1645-(1 row)
1646-
1647-SHOW pg_hint_plan.debug_print;
1648- pg_hint_plan.debug_print
1649---------------------------
1650- on
1651-(1 row)
1652-
1653-SHOW pg_hint_plan.parse_messages;
1654- pg_hint_plan.parse_messages
1655------------------------------
1656- error
1657-(1 row)
1658-
1659-RESET pg_hint_plan.enable_hint;
1660-RESET pg_hint_plan.debug_print;
1661-RESET pg_hint_plan.parse_messages;
1662-SHOW pg_hint_plan.enable_hint;
1663- pg_hint_plan.enable_hint
1664---------------------------
1665- on
1666-(1 row)
1667-
1668-SHOW pg_hint_plan.debug_print;
1669- pg_hint_plan.debug_print
1670---------------------------
1671- off
1672-(1 row)
1673-
1674-SHOW pg_hint_plan.parse_messages;
1675- pg_hint_plan.parse_messages
1676------------------------------
1677- info
1678-(1 row)
1679-
1680--- No. A-8-1-2
1681-SET ROLE normal_user;
1682-SHOW pg_hint_plan.enable_hint;
1683- pg_hint_plan.enable_hint
1684---------------------------
1685- on
1686-(1 row)
1687-
1688-SHOW pg_hint_plan.debug_print;
1689- pg_hint_plan.debug_print
1690---------------------------
1691- off
1692-(1 row)
1693-
1694-SHOW pg_hint_plan.parse_messages;
1695- pg_hint_plan.parse_messages
1696------------------------------
1697- info
1698-(1 row)
1699-
1700-SET pg_hint_plan.enable_hint TO off;
1701-SET pg_hint_plan.debug_print TO on;
1702-SET pg_hint_plan.parse_messages TO error;
1703-SHOW pg_hint_plan.enable_hint;
1704- pg_hint_plan.enable_hint
1705---------------------------
1706- off
1707-(1 row)
1708-
1709-SHOW pg_hint_plan.debug_print;
1710- pg_hint_plan.debug_print
1711---------------------------
1712- on
1713-(1 row)
1714-
1715-SHOW pg_hint_plan.parse_messages;
1716- pg_hint_plan.parse_messages
1717------------------------------
1718- error
1719-(1 row)
1720-
1721-RESET pg_hint_plan.enable_hint;
1722-RESET pg_hint_plan.debug_print;
1723-RESET pg_hint_plan.parse_messages;
1724-SHOW pg_hint_plan.enable_hint;
1725- pg_hint_plan.enable_hint
1726---------------------------
1727- on
1728-(1 row)
1729-
1730-SHOW pg_hint_plan.debug_print;
1731- pg_hint_plan.debug_print
1732---------------------------
1733- off
1734-(1 row)
1735-
1736-SHOW pg_hint_plan.parse_messages;
1737- pg_hint_plan.parse_messages
1738------------------------------
1739- info
1740-(1 row)
1741-
1742-RESET ROLE;
1743-----
1744----- No. A-8-2 original GUC parameter pg_hint_plan.enable_hint
1745-----
1746--- No. A-8-2-1
1747-SET pg_hint_plan.enable_hint TO on;
1748-SHOW pg_hint_plan.enable_hint;
1749- pg_hint_plan.enable_hint
1750---------------------------
1751- on
1752-(1 row)
1753-
1754-/*+Set(enable_indexscan off)*/
1755-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1756- QUERY PLAN
1757-----------------------------------
1758- Bitmap Heap Scan on t1
1759- Recheck Cond: (c1 = 1)
1760- -> Bitmap Index Scan on t1_i1
1761- Index Cond: (c1 = 1)
1762-(4 rows)
1763-
1764--- No. A-8-2-2
1765-SET pg_hint_plan.enable_hint TO off;
1766-SHOW pg_hint_plan.enable_hint;
1767- pg_hint_plan.enable_hint
1768---------------------------
1769- off
1770-(1 row)
1771-
1772-/*+Set(enable_indexscan off)*/
1773-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1774- QUERY PLAN
1775-------------------------------
1776- Index Scan using t1_i1 on t1
1777- Index Cond: (c1 = 1)
1778-(2 rows)
1779-
1780--- No. A-8-2-3
1781-SET pg_hint_plan.enable_hint TO DEFAULT;
1782-SHOW pg_hint_plan.enable_hint;
1783- pg_hint_plan.enable_hint
1784---------------------------
1785- on
1786-(1 row)
1787-
1788-/*+Set(enable_indexscan off)*/
1789-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1790- QUERY PLAN
1791-----------------------------------
1792- Bitmap Heap Scan on t1
1793- Recheck Cond: (c1 = 1)
1794- -> Bitmap Index Scan on t1_i1
1795- Index Cond: (c1 = 1)
1796-(4 rows)
1797-
1798--- No. A-8-2-4
1799-SET pg_hint_plan.enable_hint TO enable;
1800-ERROR: parameter "pg_hint_plan.enable_hint" requires a Boolean value
1801-SHOW pg_hint_plan.enable_hint;
1802- pg_hint_plan.enable_hint
1803---------------------------
1804- on
1805-(1 row)
1806-
1807-----
1808----- No. A-8-3 original GUC parameter pg_hint_plan.debug_print
1809-----
1810--- No. A-8-3-1
1811-SET pg_hint_plan.debug_print TO on;
1812-SHOW pg_hint_plan.debug_print;
1813- pg_hint_plan.debug_print
1814---------------------------
1815- on
1816-(1 row)
1817-
1818-/*+Set(enable_indexscan off)*/
1819-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1820-LOG: pg_hint_plan:
1821-used hint:
1822-Set(enable_indexscan off)
1823-not used hint:
1824-duplication hint:
1825-error hint:
1826-
1827- QUERY PLAN
1828-----------------------------------
1829- Bitmap Heap Scan on t1
1830- Recheck Cond: (c1 = 1)
1831- -> Bitmap Index Scan on t1_i1
1832- Index Cond: (c1 = 1)
1833-(4 rows)
1834-
1835--- No. A-8-3-2
1836-SET pg_hint_plan.debug_print TO off;
1837-SHOW pg_hint_plan.debug_print;
1838- pg_hint_plan.debug_print
1839---------------------------
1840- off
1841-(1 row)
1842-
1843-/*+Set(enable_indexscan off)*/
1844-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1845- QUERY PLAN
1846-----------------------------------
1847- Bitmap Heap Scan on t1
1848- Recheck Cond: (c1 = 1)
1849- -> Bitmap Index Scan on t1_i1
1850- Index Cond: (c1 = 1)
1851-(4 rows)
1852-
1853--- No. A-8-3-3
1854-SET pg_hint_plan.debug_print TO DEFAULT;
1855-SHOW pg_hint_plan.debug_print;
1856- pg_hint_plan.debug_print
1857---------------------------
1858- off
1859-(1 row)
1860-
1861-/*+Set(enable_indexscan off)*/
1862-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
1863- QUERY PLAN
1864-----------------------------------
1865- Bitmap Heap Scan on t1
1866- Recheck Cond: (c1 = 1)
1867- -> Bitmap Index Scan on t1_i1
1868- Index Cond: (c1 = 1)
1869-(4 rows)
1870-
1871--- No. A-8-3-4
1872-SET pg_hint_plan.debug_print TO enable;
1873-ERROR: parameter "pg_hint_plan.debug_print" requires a Boolean value
1874-SHOW pg_hint_plan.debug_print;
1875- pg_hint_plan.debug_print
1876---------------------------
1877- off
1878-(1 row)
1879-
1880-----
1881----- No. A-8-4 original GUC parameter pg_hint_plan.parse_messages
1882-----
1883-SET client_min_messages TO debug5;
1884-DEBUG: CommitTransactionCommand
1885-DEBUG: CommitTransaction
1886-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1887--- No. A-8-4-1
1888-SET pg_hint_plan.parse_messages TO debug5;
1889-DEBUG: StartTransactionCommand
1890-DEBUG: StartTransaction
1891-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1892-DEBUG: ProcessUtility
1893-DEBUG: CommitTransactionCommand
1894-DEBUG: CommitTransaction
1895-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1896-SHOW pg_hint_plan.parse_messages;
1897-DEBUG: StartTransactionCommand
1898-DEBUG: StartTransaction
1899-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1900-DEBUG: ProcessUtility
1901-DEBUG: CommitTransactionCommand
1902-DEBUG: CommitTransaction
1903-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1904- pg_hint_plan.parse_messages
1905------------------------------
1906- debug5
1907-(1 row)
1908-
1909-/*+Set*/SELECT 1;
1910-DEBUG: StartTransactionCommand
1911-DEBUG: StartTransaction
1912-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1913-DEBUG: hint syntax error at or near ""
1914-DETAIL: Opening parenthesis is necessary.
1915-DEBUG: CommitTransactionCommand
1916-DEBUG: CommitTransaction
1917-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1918- ?column?
1919-----------
1920- 1
1921-(1 row)
1922-
1923-SET client_min_messages TO debug4;
1924-DEBUG: StartTransactionCommand
1925-DEBUG: StartTransaction
1926-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1927-DEBUG: ProcessUtility
1928-DEBUG: CommitTransactionCommand
1929-DEBUG: CommitTransaction
1930-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1931-/*+Set*/SELECT 1;
1932-DEBUG: StartTransactionCommand
1933-DEBUG: StartTransaction
1934-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1935-DEBUG: CommitTransactionCommand
1936-DEBUG: CommitTransaction
1937-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1938- ?column?
1939-----------
1940- 1
1941-(1 row)
1942-
1943--- No. A-8-4-2
1944-SET pg_hint_plan.parse_messages TO debug4;
1945-DEBUG: StartTransactionCommand
1946-DEBUG: StartTransaction
1947-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1948-DEBUG: ProcessUtility
1949-DEBUG: CommitTransactionCommand
1950-DEBUG: CommitTransaction
1951-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1952-SHOW pg_hint_plan.parse_messages;
1953-DEBUG: StartTransactionCommand
1954-DEBUG: StartTransaction
1955-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1956-DEBUG: ProcessUtility
1957-DEBUG: CommitTransactionCommand
1958-DEBUG: CommitTransaction
1959-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1960- pg_hint_plan.parse_messages
1961------------------------------
1962- debug4
1963-(1 row)
1964-
1965-/*+Set*/SELECT 1;
1966-DEBUG: StartTransactionCommand
1967-DEBUG: StartTransaction
1968-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1969-DEBUG: hint syntax error at or near ""
1970-DETAIL: Opening parenthesis is necessary.
1971-DEBUG: CommitTransactionCommand
1972-DEBUG: CommitTransaction
1973-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1974- ?column?
1975-----------
1976- 1
1977-(1 row)
1978-
1979-SET client_min_messages TO debug3;
1980-DEBUG: StartTransactionCommand
1981-DEBUG: StartTransaction
1982-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1983-DEBUG: ProcessUtility
1984-DEBUG: CommitTransactionCommand
1985-DEBUG: CommitTransaction
1986-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1987-/*+Set*/SELECT 1;
1988-DEBUG: StartTransactionCommand
1989-DEBUG: StartTransaction
1990-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1991-DEBUG: CommitTransactionCommand
1992-DEBUG: CommitTransaction
1993-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
1994- ?column?
1995-----------
1996- 1
1997-(1 row)
1998-
1999--- No. A-8-4-3
2000-SET pg_hint_plan.parse_messages TO debug3;
2001-DEBUG: StartTransactionCommand
2002-DEBUG: StartTransaction
2003-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2004-DEBUG: ProcessUtility
2005-DEBUG: CommitTransactionCommand
2006-DEBUG: CommitTransaction
2007-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2008-SHOW pg_hint_plan.parse_messages;
2009-DEBUG: StartTransactionCommand
2010-DEBUG: StartTransaction
2011-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2012-DEBUG: ProcessUtility
2013-DEBUG: CommitTransactionCommand
2014-DEBUG: CommitTransaction
2015-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2016- pg_hint_plan.parse_messages
2017------------------------------
2018- debug3
2019-(1 row)
2020-
2021-/*+Set*/SELECT 1;
2022-DEBUG: StartTransactionCommand
2023-DEBUG: StartTransaction
2024-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2025-DEBUG: hint syntax error at or near ""
2026-DETAIL: Opening parenthesis is necessary.
2027-DEBUG: CommitTransactionCommand
2028-DEBUG: CommitTransaction
2029-DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2030- ?column?
2031-----------
2032- 1
2033-(1 row)
2034-
2035-SET client_min_messages TO debug2;
2036-DEBUG: StartTransactionCommand
2037-DEBUG: StartTransaction
2038-DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
2039-DEBUG: ProcessUtility
2040-/*+Set*/SELECT 1;
2041- ?column?
2042-----------
2043- 1
2044-(1 row)
2045-
2046--- No. A-8-4-4
2047-SET pg_hint_plan.parse_messages TO debug2;
2048-SHOW pg_hint_plan.parse_messages;
2049- pg_hint_plan.parse_messages
2050------------------------------
2051- debug
2052-(1 row)
2053-
2054-/*+Set*/SELECT 1;
2055-DEBUG: hint syntax error at or near ""
2056-DETAIL: Opening parenthesis is necessary.
2057- ?column?
2058-----------
2059- 1
2060-(1 row)
2061-
2062-SET client_min_messages TO debug1;
2063-/*+Set*/SELECT 1;
2064- ?column?
2065-----------
2066- 1
2067-(1 row)
2068-
2069--- No. A-8-4-5
2070-SET pg_hint_plan.parse_messages TO debug1;
2071-SHOW pg_hint_plan.parse_messages;
2072- pg_hint_plan.parse_messages
2073------------------------------
2074- debug1
2075-(1 row)
2076-
2077-/*+Set*/SELECT 1;
2078-DEBUG: hint syntax error at or near ""
2079-DETAIL: Opening parenthesis is necessary.
2080- ?column?
2081-----------
2082- 1
2083-(1 row)
2084-
2085-SET client_min_messages TO log;
2086-/*+Set*/SELECT 1;
2087- ?column?
2088-----------
2089- 1
2090-(1 row)
2091-
2092--- No. A-8-4-6
2093-SET pg_hint_plan.parse_messages TO log;
2094-SHOW pg_hint_plan.parse_messages;
2095- pg_hint_plan.parse_messages
2096------------------------------
2097- log
2098-(1 row)
2099-
2100-/*+Set*/SELECT 1;
2101-LOG: hint syntax error at or near ""
2102-DETAIL: Opening parenthesis is necessary.
2103- ?column?
2104-----------
2105- 1
2106-(1 row)
2107-
2108-SET client_min_messages TO info;
2109-/*+Set*/SELECT 1;
2110- ?column?
2111-----------
2112- 1
2113-(1 row)
2114-
2115--- No. A-8-4-7
2116-SET pg_hint_plan.parse_messages TO info;
2117-SHOW pg_hint_plan.parse_messages;
2118- pg_hint_plan.parse_messages
2119------------------------------
2120- info
2121-(1 row)
2122-
2123-/*+Set*/SELECT 1;
2124-INFO: hint syntax error at or near ""
2125-DETAIL: Opening parenthesis is necessary.
2126- ?column?
2127-----------
2128- 1
2129-(1 row)
2130-
2131-SET client_min_messages TO notice;
2132-/*+Set*/SELECT 1;
2133-INFO: hint syntax error at or near ""
2134-DETAIL: Opening parenthesis is necessary.
2135- ?column?
2136-----------
2137- 1
2138-(1 row)
2139-
2140--- No. A-8-4-8
2141-SET pg_hint_plan.parse_messages TO notice;
2142-SHOW pg_hint_plan.parse_messages;
2143- pg_hint_plan.parse_messages
2144------------------------------
2145- notice
2146-(1 row)
2147-
2148-/*+Set*/SELECT 1;
2149-NOTICE: hint syntax error at or near ""
2150-DETAIL: Opening parenthesis is necessary.
2151- ?column?
2152-----------
2153- 1
2154-(1 row)
2155-
2156-SET client_min_messages TO warning;
2157-/*+Set*/SELECT 1;
2158- ?column?
2159-----------
2160- 1
2161-(1 row)
2162-
2163--- No. A-8-4-9
2164-SET pg_hint_plan.parse_messages TO warning;
2165-SHOW pg_hint_plan.parse_messages;
2166- pg_hint_plan.parse_messages
2167------------------------------
2168- warning
2169-(1 row)
2170-
2171-/*+Set*/SELECT 1;
2172-WARNING: hint syntax error at or near ""
2173-DETAIL: Opening parenthesis is necessary.
2174- ?column?
2175-----------
2176- 1
2177-(1 row)
2178-
2179-SET client_min_messages TO error;
2180-/*+Set*/SELECT 1;
2181- ?column?
2182-----------
2183- 1
2184-(1 row)
2185-
2186--- No. A-8-4-10
2187-SET pg_hint_plan.parse_messages TO error;
2188-SHOW pg_hint_plan.parse_messages;
2189- pg_hint_plan.parse_messages
2190------------------------------
2191- error
2192-(1 row)
2193-
2194-/*+Set*/SELECT 1;
2195-ERROR: hint syntax error at or near ""
2196-DETAIL: Opening parenthesis is necessary.
2197-SET client_min_messages TO fatal;
2198-/*+Set*/SELECT 1;
2199--- No. A-8-4-11
2200-RESET client_min_messages;
2201-SET pg_hint_plan.parse_messages TO DEFAULT;
2202-SHOW pg_hint_plan.parse_messages;
2203- pg_hint_plan.parse_messages
2204------------------------------
2205- info
2206-(1 row)
2207-
2208-/*+Set*/SELECT 1;
2209-INFO: hint syntax error at or near ""
2210-DETAIL: Opening parenthesis is necessary.
2211- ?column?
2212-----------
2213- 1
2214-(1 row)
2215-
2216--- No. A-8-4-12
2217-SET pg_hint_plan.parse_messages TO fatal;
2218-ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "fatal"
2219-HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2220-SHOW pg_hint_plan.parse_messages;
2221- pg_hint_plan.parse_messages
2222------------------------------
2223- info
2224-(1 row)
2225-
2226--- No. A-8-4-13
2227-SET pg_hint_plan.parse_messages TO panic;
2228-ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "panic"
2229-HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2230-SHOW pg_hint_plan.parse_messages;
2231- pg_hint_plan.parse_messages
2232------------------------------
2233- info
2234-(1 row)
2235-
2236--- No. A-8-4-14
2237-SET pg_hint_plan.parse_messages TO on;
2238-ERROR: invalid value for parameter "pg_hint_plan.parse_messages": "on"
2239-HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, info, notice, warning, error.
2240-SHOW pg_hint_plan.parse_messages;
2241- pg_hint_plan.parse_messages
2242------------------------------
2243- info
2244-(1 row)
2245-
2246-----
2247----- No. A-8-5 original GUC parameter pg_hint_plan.enable_hint_table
2248-----
2249-INSERT INTO hint_plan.hints (norm_query_string, application_name, hints)
2250- VALUES (
2251- 'EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = ?;',
2252- '',
2253- 'SeqScan(t1)');
2254--- No. A-8-5-1
2255-SET pg_hint_plan.enable_hint_table TO on;
2256-SHOW pg_hint_plan.enable_hint_table;
2257- pg_hint_plan.enable_hint_table
2258---------------------------------
2259- on
2260-(1 row)
2261-
2262-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2263- QUERY PLAN
2264---------------------
2265- Seq Scan on t1
2266- Filter: (c1 = 1)
2267-(2 rows)
2268-
2269--- No. A-8-5-2
2270-SET pg_hint_plan.enable_hint_table TO off;
2271-SHOW pg_hint_plan.enable_hint_table;
2272- pg_hint_plan.enable_hint_table
2273---------------------------------
2274- off
2275-(1 row)
2276-
2277-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2278- QUERY PLAN
2279-------------------------------
2280- Index Scan using t1_i1 on t1
2281- Index Cond: (c1 = 1)
2282-(2 rows)
2283-
2284--- No. A-8-5-3
2285-SET pg_hint_plan.enable_hint_table TO DEFAULT;
2286-SHOW pg_hint_plan.enable_hint_table;
2287- pg_hint_plan.enable_hint_table
2288---------------------------------
2289- off
2290-(1 row)
2291-
2292-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2293- QUERY PLAN
2294-------------------------------
2295- Index Scan using t1_i1 on t1
2296- Index Cond: (c1 = 1)
2297-(2 rows)
2298-
2299--- No. A-8-5-4
2300-SET pg_hint_plan.enable_hint_table TO enable;
2301-ERROR: parameter "pg_hint_plan.enable_hint_table" requires a Boolean value
2302-SHOW pg_hint_plan.enable_hint_table;
2303- pg_hint_plan.enable_hint_table
2304---------------------------------
2305- off
2306-(1 row)
2307-
2308-TRUNCATE hint_plan.hints;
2309-----
2310----- No. A-9-1 parse error message output
2311-----
2312--- No. A-9-1-1
2313-/*+"Set"(enable_indexscan on)*/SELECT 1;
2314-INFO: hint syntax error at or near ""Set"(enable_indexscan on)"
2315-DETAIL: Unrecognized hint keyword ""Set"".
2316- ?column?
2317-----------
2318- 1
2319-(1 row)
2320-
2321-/*+Set()(enable_indexscan on)*/SELECT 1;
2322-INFO: hint syntax error at or near "Set()(enable_indexscan on)"
2323-DETAIL: Set hint requires name and value of GUC parameter.
2324-INFO: hint syntax error at or near "(enable_indexscan on)"
2325-DETAIL: Unrecognized hint keyword "".
2326- ?column?
2327-----------
2328- 1
2329-(1 row)
2330-
2331-/*+Set(enable_indexscan on*/SELECT 1;
2332-INFO: hint syntax error at or near ""
2333-DETAIL: Closing parenthesis is necessary.
2334- ?column?
2335-----------
2336- 1
2337-(1 row)
2338-
2339-----
2340----- No. A-9-3 hint state output
2341-----
2342-SET pg_hint_plan.debug_print TO on;
2343-SET client_min_messages TO LOG;
2344--- No. A-9-3-1
2345-/*+SeqScan(t1)*/
2346-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2347-LOG: pg_hint_plan:
2348-used hint:
2349-SeqScan(t1)
2350-not used hint:
2351-duplication hint:
2352-error hint:
2353-
2354- QUERY PLAN
2355---------------------
2356- Seq Scan on t1
2357- Filter: (c1 = 1)
2358-(2 rows)
2359-
2360--- No. A-9-3-2
2361-/*+SeqScan(no_table)*/
2362-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2363-LOG: pg_hint_plan:
2364-used hint:
2365-not used hint:
2366-SeqScan(no_table)
2367-duplication hint:
2368-error hint:
2369-
2370- QUERY PLAN
2371-------------------------------
2372- Index Scan using t1_i1 on t1
2373- Index Cond: (c1 = 1)
2374-(2 rows)
2375-
2376--- No. A-9-3-3
2377-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2378- QUERY PLAN
2379------------------------------------
2380- Tid Scan on t1
2381- TID Cond: (ctid = '(1,1)'::tid)
2382- Filter: (c1 = 1)
2383-(3 rows)
2384-
2385-/*+TidScan(t1)BitmapScan(t1)*/
2386-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2387-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)"
2388-DETAIL: Conflict scan method hint.
2389-LOG: pg_hint_plan:
2390-used hint:
2391-BitmapScan(t1)
2392-not used hint:
2393-duplication hint:
2394-TidScan(t1)
2395-error hint:
2396-
2397- QUERY PLAN
2398-----------------------------------
2399- Bitmap Heap Scan on t1
2400- Recheck Cond: (c1 = 1)
2401- Filter: (ctid = '(1,1)'::tid)
2402- -> Bitmap Index Scan on t1_i1
2403- Index Cond: (c1 = 1)
2404-(5 rows)
2405-
2406-/*+TidScan(t1)BitmapScan(t1)IndexScan(t1)*/
2407-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2408-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)"
2409-DETAIL: Conflict scan method hint.
2410-INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)"
2411-DETAIL: Conflict scan method hint.
2412-LOG: pg_hint_plan:
2413-used hint:
2414-IndexScan(t1)
2415-not used hint:
2416-duplication hint:
2417-TidScan(t1)
2418-BitmapScan(t1)
2419-error hint:
2420-
2421- QUERY PLAN
2422----------------------------------
2423- Index Scan using t1_i1 on t1
2424- Index Cond: (c1 = 1)
2425- Filter: (ctid = '(1,1)'::tid)
2426-(3 rows)
2427-
2428-/*+TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)*/
2429-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1 AND t1.ctid = '(1,1)';
2430-INFO: hint syntax error at or near "TidScan(t1)BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2431-DETAIL: Conflict scan method hint.
2432-INFO: hint syntax error at or near "BitmapScan(t1)IndexScan(t1)SeqScan(t1)"
2433-DETAIL: Conflict scan method hint.
2434-INFO: hint syntax error at or near "IndexScan(t1)SeqScan(t1)"
2435-DETAIL: Conflict scan method hint.
2436-LOG: pg_hint_plan:
2437-used hint:
2438-SeqScan(t1)
2439-not used hint:
2440-duplication hint:
2441-TidScan(t1)
2442-BitmapScan(t1)
2443-IndexScan(t1)
2444-error hint:
2445-
2446- QUERY PLAN
2447-------------------------------------------------
2448- Seq Scan on t1
2449- Filter: ((c1 = 1) AND (ctid = '(1,1)'::tid))
2450-(2 rows)
2451-
2452--- No. A-9-3-4
2453-/*+Set(enable_indexscan enable)*/
2454-EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2455-INFO: parameter "enable_indexscan" requires a Boolean value
2456-LOG: pg_hint_plan:
2457-used hint:
2458-not used hint:
2459-duplication hint:
2460-error hint:
2461-Set(enable_indexscan enable)
2462-
2463- QUERY PLAN
2464-------------------------------
2465- Index Scan using t1_i1 on t1
2466- Index Cond: (c1 = 1)
2467-(2 rows)
2468-
2469-----
2470----- No. A-10-1 hint state output
2471-----
2472-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2473-EXPLAIN (COSTS false) EXECUTE p1;
2474- QUERY PLAN
2475-------------------------------
2476- Index Scan using t1_i1 on t1
2477- Index Cond: (c1 = 1)
2478-(2 rows)
2479-
2480-DEALLOCATE p1;
2481-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2482-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2483- QUERY PLAN
2484----------------------
2485- Seq Scan on t1
2486- Filter: (c1 < $1)
2487-(2 rows)
2488-
2489-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2490- QUERY PLAN
2491----------------------
2492- Seq Scan on t1
2493- Filter: (c1 < $1)
2494-(2 rows)
2495-
2496-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2497- QUERY PLAN
2498----------------------
2499- Seq Scan on t1
2500- Filter: (c1 < $1)
2501-(2 rows)
2502-
2503-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2504- QUERY PLAN
2505----------------------
2506- Seq Scan on t1
2507- Filter: (c1 < $1)
2508-(2 rows)
2509-
2510-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2511- QUERY PLAN
2512----------------------
2513- Seq Scan on t1
2514- Filter: (c1 < $1)
2515-(2 rows)
2516-
2517-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2518- QUERY PLAN
2519----------------------
2520- Seq Scan on t1
2521- Filter: (c1 < $1)
2522-(2 rows)
2523-
2524-DEALLOCATE p1;
2525--- No. A-10-1-1
2526--- No. A-10-1-2
2527-/*+SeqScan(t1)*/
2528-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2529-LOG: pg_hint_plan:
2530-used hint:
2531-SeqScan(t1)
2532-not used hint:
2533-duplication hint:
2534-error hint:
2535-
2536-/*+BitmapScan(t1)*/
2537-EXPLAIN (COSTS false) EXECUTE p1;
2538- QUERY PLAN
2539---------------------
2540- Seq Scan on t1
2541- Filter: (c1 = 1)
2542-(2 rows)
2543-
2544-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2545-/*+BitmapScan(t1)*/
2546-EXPLAIN (COSTS false) EXECUTE p1;
2547-LOG: pg_hint_plan:
2548-used hint:
2549-SeqScan(t1)
2550-not used hint:
2551-duplication hint:
2552-error hint:
2553-
2554- QUERY PLAN
2555---------------------
2556- Seq Scan on t1
2557- Filter: (c1 = 1)
2558-(2 rows)
2559-
2560-DEALLOCATE p1;
2561-/*+BitmapScan(t1)*/
2562-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2563-LOG: pg_hint_plan:
2564-used hint:
2565-BitmapScan(t1)
2566-not used hint:
2567-duplication hint:
2568-error hint:
2569-
2570-/*+SeqScan(t1)*/
2571-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2572- QUERY PLAN
2573-----------------------------------
2574- Bitmap Heap Scan on t1
2575- Recheck Cond: (c1 < $1)
2576- -> Bitmap Index Scan on t1_i1
2577- Index Cond: (c1 < $1)
2578-(4 rows)
2579-
2580-/*+SeqScan(t1)*/
2581-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2582- QUERY PLAN
2583-----------------------------------
2584- Bitmap Heap Scan on t1
2585- Recheck Cond: (c1 < $1)
2586- -> Bitmap Index Scan on t1_i1
2587- Index Cond: (c1 < $1)
2588-(4 rows)
2589-
2590-/*+SeqScan(t1)*/
2591-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2592- QUERY PLAN
2593-----------------------------------
2594- Bitmap Heap Scan on t1
2595- Recheck Cond: (c1 < $1)
2596- -> Bitmap Index Scan on t1_i1
2597- Index Cond: (c1 < $1)
2598-(4 rows)
2599-
2600-/*+SeqScan(t1)*/
2601-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2602- QUERY PLAN
2603-----------------------------------
2604- Bitmap Heap Scan on t1
2605- Recheck Cond: (c1 < $1)
2606- -> Bitmap Index Scan on t1_i1
2607- Index Cond: (c1 < $1)
2608-(4 rows)
2609-
2610-/*+SeqScan(t1)*/
2611-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2612- QUERY PLAN
2613-----------------------------------
2614- Bitmap Heap Scan on t1
2615- Recheck Cond: (c1 < $1)
2616- -> Bitmap Index Scan on t1_i1
2617- Index Cond: (c1 < $1)
2618-(4 rows)
2619-
2620-/*+SeqScan(t1)*/
2621-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2622- QUERY PLAN
2623-----------------------------------
2624- Bitmap Heap Scan on t1
2625- Recheck Cond: (c1 < $1)
2626- -> Bitmap Index Scan on t1_i1
2627- Index Cond: (c1 < $1)
2628-(4 rows)
2629-
2630-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2631-/*+SeqScan(t1)*/
2632-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2633-LOG: pg_hint_plan:
2634-used hint:
2635-BitmapScan(t1)
2636-not used hint:
2637-duplication hint:
2638-error hint:
2639-
2640- QUERY PLAN
2641-----------------------------------
2642- Bitmap Heap Scan on t1
2643- Recheck Cond: (c1 < $1)
2644- -> Bitmap Index Scan on t1_i1
2645- Index Cond: (c1 < $1)
2646-(4 rows)
2647-
2648-DEALLOCATE p1;
2649--- No. A-10-1-3
2650--- No. A-10-1-4
2651-/*+SeqScan(t1)*/
2652-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2653-LOG: pg_hint_plan:
2654-used hint:
2655-SeqScan(t1)
2656-not used hint:
2657-duplication hint:
2658-error hint:
2659-
2660-EXPLAIN (COSTS false) EXECUTE p1;
2661- QUERY PLAN
2662---------------------
2663- Seq Scan on t1
2664- Filter: (c1 = 1)
2665-(2 rows)
2666-
2667-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2668-EXPLAIN (COSTS false) EXECUTE p1;
2669-LOG: pg_hint_plan:
2670-used hint:
2671-SeqScan(t1)
2672-not used hint:
2673-duplication hint:
2674-error hint:
2675-
2676- QUERY PLAN
2677---------------------
2678- Seq Scan on t1
2679- Filter: (c1 = 1)
2680-(2 rows)
2681-
2682-DEALLOCATE p1;
2683-/*+BitmapScan(t1)*/
2684-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2685-LOG: pg_hint_plan:
2686-used hint:
2687-BitmapScan(t1)
2688-not used hint:
2689-duplication hint:
2690-error hint:
2691-
2692-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2693- QUERY PLAN
2694-----------------------------------
2695- Bitmap Heap Scan on t1
2696- Recheck Cond: (c1 < $1)
2697- -> Bitmap Index Scan on t1_i1
2698- Index Cond: (c1 < $1)
2699-(4 rows)
2700-
2701-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2702- QUERY PLAN
2703-----------------------------------
2704- Bitmap Heap Scan on t1
2705- Recheck Cond: (c1 < $1)
2706- -> Bitmap Index Scan on t1_i1
2707- Index Cond: (c1 < $1)
2708-(4 rows)
2709-
2710-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2711- QUERY PLAN
2712-----------------------------------
2713- Bitmap Heap Scan on t1
2714- Recheck Cond: (c1 < $1)
2715- -> Bitmap Index Scan on t1_i1
2716- Index Cond: (c1 < $1)
2717-(4 rows)
2718-
2719-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2720- QUERY PLAN
2721-----------------------------------
2722- Bitmap Heap Scan on t1
2723- Recheck Cond: (c1 < $1)
2724- -> Bitmap Index Scan on t1_i1
2725- Index Cond: (c1 < $1)
2726-(4 rows)
2727-
2728-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2729- QUERY PLAN
2730-----------------------------------
2731- Bitmap Heap Scan on t1
2732- Recheck Cond: (c1 < $1)
2733- -> Bitmap Index Scan on t1_i1
2734- Index Cond: (c1 < $1)
2735-(4 rows)
2736-
2737-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2738- QUERY PLAN
2739-----------------------------------
2740- Bitmap Heap Scan on t1
2741- Recheck Cond: (c1 < $1)
2742- -> Bitmap Index Scan on t1_i1
2743- Index Cond: (c1 < $1)
2744-(4 rows)
2745-
2746-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2747-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2748-LOG: pg_hint_plan:
2749-used hint:
2750-BitmapScan(t1)
2751-not used hint:
2752-duplication hint:
2753-error hint:
2754-
2755- QUERY PLAN
2756-----------------------------------
2757- Bitmap Heap Scan on t1
2758- Recheck Cond: (c1 < $1)
2759- -> Bitmap Index Scan on t1_i1
2760- Index Cond: (c1 < $1)
2761-(4 rows)
2762-
2763-DEALLOCATE p1;
2764--- No. A-10-1-5
2765--- No. A-10-1-6
2766-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2767-/*+BitmapScan(t1)*/
2768-EXPLAIN (COSTS false) EXECUTE p1;
2769- QUERY PLAN
2770-------------------------------
2771- Index Scan using t1_i1 on t1
2772- Index Cond: (c1 = 1)
2773-(2 rows)
2774-
2775-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2776-/*+BitmapScan(t1)*/
2777-EXPLAIN (COSTS false) EXECUTE p1;
2778- QUERY PLAN
2779-------------------------------
2780- Index Scan using t1_i1 on t1
2781- Index Cond: (c1 = 1)
2782-(2 rows)
2783-
2784-DEALLOCATE p1;
2785-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2786-/*+BitmapScan(t1)*/
2787-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2788- QUERY PLAN
2789----------------------
2790- Seq Scan on t1
2791- Filter: (c1 < $1)
2792-(2 rows)
2793-
2794-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2795- QUERY PLAN
2796----------------------
2797- Seq Scan on t1
2798- Filter: (c1 < $1)
2799-(2 rows)
2800-
2801-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2802- QUERY PLAN
2803----------------------
2804- Seq Scan on t1
2805- Filter: (c1 < $1)
2806-(2 rows)
2807-
2808-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2809- QUERY PLAN
2810----------------------
2811- Seq Scan on t1
2812- Filter: (c1 < $1)
2813-(2 rows)
2814-
2815-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2816- QUERY PLAN
2817----------------------
2818- Seq Scan on t1
2819- Filter: (c1 < $1)
2820-(2 rows)
2821-
2822-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2823- QUERY PLAN
2824----------------------
2825- Seq Scan on t1
2826- Filter: (c1 < $1)
2827-(2 rows)
2828-
2829-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2830-/*+BitmapScan(t1)*/
2831-EXPLAIN (COSTS false) EXECUTE p1 (1000);
2832- QUERY PLAN
2833----------------------
2834- Seq Scan on t1
2835- Filter: (c1 < $1)
2836-(2 rows)
2837-
2838-DEALLOCATE p1;
2839--- No. A-10-1-9
2840--- No. A-10-1-10
2841-/*+SeqScan(t1)*/
2842-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2843-LOG: pg_hint_plan:
2844-used hint:
2845-SeqScan(t1)
2846-not used hint:
2847-duplication hint:
2848-error hint:
2849-
2850-/*+BitmapScan(t1)*/
2851-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2852- QUERY PLAN
2853---------------------
2854- Seq Scan on t1
2855- Filter: (c1 = 1)
2856-(2 rows)
2857-
2858-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2859-/*+BitmapScan(t1)*/
2860-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2861-LOG: pg_hint_plan:
2862-used hint:
2863-SeqScan(t1)
2864-not used hint:
2865-duplication hint:
2866-error hint:
2867-
2868- QUERY PLAN
2869---------------------
2870- Seq Scan on t1
2871- Filter: (c1 = 1)
2872-(2 rows)
2873-
2874-DEALLOCATE p1;
2875-/*+BitmapScan(t1)*/
2876-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2877-LOG: pg_hint_plan:
2878-used hint:
2879-BitmapScan(t1)
2880-not used hint:
2881-duplication hint:
2882-error hint:
2883-
2884-/*+SeqScan(t1)*/
2885-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2886- QUERY PLAN
2887-----------------------------------
2888- Bitmap Heap Scan on t1
2889- Recheck Cond: (c1 < $1)
2890- -> Bitmap Index Scan on t1_i1
2891- Index Cond: (c1 < $1)
2892-(4 rows)
2893-
2894-/*+SeqScan(t1)*/
2895-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2896- QUERY PLAN
2897-----------------------------------
2898- Bitmap Heap Scan on t1
2899- Recheck Cond: (c1 < $1)
2900- -> Bitmap Index Scan on t1_i1
2901- Index Cond: (c1 < $1)
2902-(4 rows)
2903-
2904-/*+SeqScan(t1)*/
2905-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2906- QUERY PLAN
2907-----------------------------------
2908- Bitmap Heap Scan on t1
2909- Recheck Cond: (c1 < $1)
2910- -> Bitmap Index Scan on t1_i1
2911- Index Cond: (c1 < $1)
2912-(4 rows)
2913-
2914-/*+SeqScan(t1)*/
2915-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2916- QUERY PLAN
2917-----------------------------------
2918- Bitmap Heap Scan on t1
2919- Recheck Cond: (c1 < $1)
2920- -> Bitmap Index Scan on t1_i1
2921- Index Cond: (c1 < $1)
2922-(4 rows)
2923-
2924-/*+SeqScan(t1)*/
2925-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2926- QUERY PLAN
2927-----------------------------------
2928- Bitmap Heap Scan on t1
2929- Recheck Cond: (c1 < $1)
2930- -> Bitmap Index Scan on t1_i1
2931- Index Cond: (c1 < $1)
2932-(4 rows)
2933-
2934-/*+SeqScan(t1)*/
2935-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2936- QUERY PLAN
2937-----------------------------------
2938- Bitmap Heap Scan on t1
2939- Recheck Cond: (c1 < $1)
2940- -> Bitmap Index Scan on t1_i1
2941- Index Cond: (c1 < $1)
2942-(4 rows)
2943-
2944-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2945-/*+SeqScan(t1)*/
2946-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
2947-LOG: pg_hint_plan:
2948-used hint:
2949-BitmapScan(t1)
2950-not used hint:
2951-duplication hint:
2952-error hint:
2953-
2954- QUERY PLAN
2955-----------------------------------
2956- Bitmap Heap Scan on t1
2957- Recheck Cond: (c1 < $1)
2958- -> Bitmap Index Scan on t1_i1
2959- Index Cond: (c1 < $1)
2960-(4 rows)
2961-
2962-DEALLOCATE p1;
2963--- No. A-10-1-11
2964--- No. A-10-1-12
2965-/*+SeqScan(t1)*/
2966-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
2967-LOG: pg_hint_plan:
2968-used hint:
2969-SeqScan(t1)
2970-not used hint:
2971-duplication hint:
2972-error hint:
2973-
2974-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2975- QUERY PLAN
2976---------------------
2977- Seq Scan on t1
2978- Filter: (c1 = 1)
2979-(2 rows)
2980-
2981-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
2982-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
2983-LOG: pg_hint_plan:
2984-used hint:
2985-SeqScan(t1)
2986-not used hint:
2987-duplication hint:
2988-error hint:
2989-
2990- QUERY PLAN
2991---------------------
2992- Seq Scan on t1
2993- Filter: (c1 = 1)
2994-(2 rows)
2995-
2996-DEALLOCATE p1;
2997-/*+BitmapScan(t1)*/
2998-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
2999-LOG: pg_hint_plan:
3000-used hint:
3001-BitmapScan(t1)
3002-not used hint:
3003-duplication hint:
3004-error hint:
3005-
3006-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3007- QUERY PLAN
3008-----------------------------------
3009- Bitmap Heap Scan on t1
3010- Recheck Cond: (c1 < $1)
3011- -> Bitmap Index Scan on t1_i1
3012- Index Cond: (c1 < $1)
3013-(4 rows)
3014-
3015-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3016- QUERY PLAN
3017-----------------------------------
3018- Bitmap Heap Scan on t1
3019- Recheck Cond: (c1 < $1)
3020- -> Bitmap Index Scan on t1_i1
3021- Index Cond: (c1 < $1)
3022-(4 rows)
3023-
3024-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3025- QUERY PLAN
3026-----------------------------------
3027- Bitmap Heap Scan on t1
3028- Recheck Cond: (c1 < $1)
3029- -> Bitmap Index Scan on t1_i1
3030- Index Cond: (c1 < $1)
3031-(4 rows)
3032-
3033-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3034- QUERY PLAN
3035-----------------------------------
3036- Bitmap Heap Scan on t1
3037- Recheck Cond: (c1 < $1)
3038- -> Bitmap Index Scan on t1_i1
3039- Index Cond: (c1 < $1)
3040-(4 rows)
3041-
3042-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3043- QUERY PLAN
3044-----------------------------------
3045- Bitmap Heap Scan on t1
3046- Recheck Cond: (c1 < $1)
3047- -> Bitmap Index Scan on t1_i1
3048- Index Cond: (c1 < $1)
3049-(4 rows)
3050-
3051-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3052- QUERY PLAN
3053-----------------------------------
3054- Bitmap Heap Scan on t1
3055- Recheck Cond: (c1 < $1)
3056- -> Bitmap Index Scan on t1_i1
3057- Index Cond: (c1 < $1)
3058-(4 rows)
3059-
3060-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3061-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3062-LOG: pg_hint_plan:
3063-used hint:
3064-BitmapScan(t1)
3065-not used hint:
3066-duplication hint:
3067-error hint:
3068-
3069- QUERY PLAN
3070-----------------------------------
3071- Bitmap Heap Scan on t1
3072- Recheck Cond: (c1 < $1)
3073- -> Bitmap Index Scan on t1_i1
3074- Index Cond: (c1 < $1)
3075-(4 rows)
3076-
3077-DEALLOCATE p1;
3078--- No. A-10-1-13
3079--- No. A-10-1-14
3080-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3081-/*+BitmapScan(t1)*/
3082-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3083- QUERY PLAN
3084-------------------------------
3085- Index Scan using t1_i1 on t1
3086- Index Cond: (c1 = 1)
3087-(2 rows)
3088-
3089-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3090-/*+BitmapScan(t1)*/
3091-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1;
3092- QUERY PLAN
3093-------------------------------
3094- Index Scan using t1_i1 on t1
3095- Index Cond: (c1 = 1)
3096-(2 rows)
3097-
3098-DEALLOCATE p1;
3099-PREPARE p1 AS SELECT * FROM s1.t1 WHERE t1.c1 < $1;
3100-/*+BitmapScan(t1)*/
3101-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3102- QUERY PLAN
3103----------------------
3104- Seq Scan on t1
3105- Filter: (c1 < $1)
3106-(2 rows)
3107-
3108-/*+BitmapScan(t1)*/
3109-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3110- QUERY PLAN
3111----------------------
3112- Seq Scan on t1
3113- Filter: (c1 < $1)
3114-(2 rows)
3115-
3116-/*+BitmapScan(t1)*/
3117-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3118- QUERY PLAN
3119----------------------
3120- Seq Scan on t1
3121- Filter: (c1 < $1)
3122-(2 rows)
3123-
3124-/*+BitmapScan(t1)*/
3125-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3126- QUERY PLAN
3127----------------------
3128- Seq Scan on t1
3129- Filter: (c1 < $1)
3130-(2 rows)
3131-
3132-/*+BitmapScan(t1)*/
3133-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3134- QUERY PLAN
3135----------------------
3136- Seq Scan on t1
3137- Filter: (c1 < $1)
3138-(2 rows)
3139-
3140-/*+BitmapScan(t1)*/
3141-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3142- QUERY PLAN
3143----------------------
3144- Seq Scan on t1
3145- Filter: (c1 < $1)
3146-(2 rows)
3147-
3148-UPDATE pg_catalog.pg_class SET relpages = relpages WHERE relname = 't1';
3149-/*+BitmapScan(t1)*/
3150-EXPLAIN (COSTS false) CREATE TABLE test AS EXECUTE p1 (1000);
3151- QUERY PLAN
3152----------------------
3153- Seq Scan on t1
3154- Filter: (c1 < $1)
3155-(2 rows)
3156-
3157-DEALLOCATE p1;
3158-----
3159----- No. A-10-4 EXECUTE statement name error
3160-----
3161--- No. A-10-4-1
3162-EXECUTE p1;
3163-ERROR: prepared statement "p1" does not exist
3164-SHOW pg_hint_plan.debug_print;
3165- pg_hint_plan.debug_print
3166---------------------------
3167- on
3168-(1 row)
3169-
3170-----
3171----- No. A-11-5 EXECUTE statement name error
3172-----
3173--- No. A-11-5-1
3174-SELECT pg_stat_statements_reset();
3175- pg_stat_statements_reset
3176---------------------------
3177-
3178-(1 row)
3179-
3180-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3181- c1 | c2 | c3 | c4
3182-----+----+----+----
3183- 1 | 1 | 1 | 1
3184-(1 row)
3185-
3186-/*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3187-LOG: pg_hint_plan:
3188-used hint:
3189-Set(enable_seqscan off)
3190-not used hint:
3191-duplication hint:
3192-error hint:
3193-
3194- c1 | c2 | c3 | c4
3195-----+----+----+----
3196- 1 | 1 | 1 | 1
3197-(1 row)
3198-
3199-/*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1;
3200-LOG: pg_hint_plan:
3201-used hint:
3202-SeqScan(t1)
3203-not used hint:
3204-duplication hint:
3205-error hint:
3206-
3207- c1 | c2 | c3 | c4
3208-----+----+----+----
3209- 1 | 1 | 1 | 1
3210-(1 row)
3211-
3212-SELECT s.query, s.calls
3213- FROM public.pg_stat_statements s
3214- JOIN pg_catalog.pg_database d
3215- ON (s.dbid = d.oid)
3216- ORDER BY 1;
3217- query | calls
3218--------------------------------------------------------------------+-------
3219- /*+SeqScan(t1)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3220- /*+Set(enable_seqscan off)*/ SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3221- SELECT * FROM s1.t1 WHERE t1.c1 = 1; | 1
3222- SELECT pg_stat_statements_reset(); | 1
3223-(4 rows)
3224-
3225-----
3226----- No. A-12-1 reset of global variable of core at the error
3227----- No. A-12-2 reset of global variable of original at the error
3228-----
3229-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3230- QUERY PLAN
3231-------------------------------------
3232- Merge Join
3233- Merge Cond: (t1.c1 = t2.c1)
3234- -> Index Scan using t1_i1 on t1
3235- -> Sort
3236- Sort Key: t2.c1
3237- -> Seq Scan on t2
3238-(6 rows)
3239-
3240-/*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3241-PREPARE p1 AS SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3242-INFO: hint syntax error at or near "NestLoop(t1 t1)"
3243-DETAIL: Relation name "t1" is duplicated.
3244-LOG: pg_hint_plan:
3245-used hint:
3246-SeqScan(t1)
3247-MergeJoin(t1 t2)
3248-Set(enable_seqscan off)
3249-Set(geqo_threshold 100)
3250-not used hint:
3251-duplication hint:
3252-error hint:
3253-NestLoop(t1 t1)
3254-
3255-EXPLAIN (COSTS false) EXECUTE p1;
3256- QUERY PLAN
3257-------------------------------------
3258- Merge Join
3259- Merge Cond: (t1.c1 = t2.c1)
3260- -> Sort
3261- Sort Key: t1.c1
3262- -> Seq Scan on t1
3263- -> Index Scan using t2_i1 on t2
3264-(6 rows)
3265-
3266--- No. A-12-1-1
3267--- No. A-12-2-1
3268-SELECT name, setting FROM settings;
3269- name | setting
3270----------------------------+-----------
3271- geqo | on
3272- geqo_effort | 5
3273- geqo_generations | 0
3274- geqo_pool_size | 0
3275- geqo_seed | 0
3276- geqo_selection_bias | 2
3277- geqo_threshold | 12
3278- constraint_exclusion | partition
3279- cursor_tuple_fraction | 0.1
3280- default_statistics_target | 100
3281- from_collapse_limit | 8
3282- join_collapse_limit | 8
3283- cpu_index_tuple_cost | 0.005
3284- cpu_operator_cost | 0.0025
3285- cpu_tuple_cost | 0.01
3286- effective_cache_size | 16384
3287- random_page_cost | 4
3288- seq_page_cost | 1
3289- enable_bitmapscan | on
3290- enable_hashagg | on
3291- enable_hashjoin | on
3292- enable_indexscan | on
3293- enable_material | on
3294- enable_mergejoin | on
3295- enable_nestloop | on
3296- enable_seqscan | on
3297- enable_sort | on
3298- enable_tidscan | on
3299- client_min_messages | log
3300-(29 rows)
3301-
3302-SET pg_hint_plan.parse_messages TO error;
3303-/*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3304-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3305-ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3306-DETAIL: Relation name "t1" is duplicated.
3307-SELECT name, setting FROM settings;
3308- name | setting
3309----------------------------+-----------
3310- geqo | on
3311- geqo_effort | 5
3312- geqo_generations | 0
3313- geqo_pool_size | 0
3314- geqo_seed | 0
3315- geqo_selection_bias | 2
3316- geqo_threshold | 12
3317- constraint_exclusion | partition
3318- cursor_tuple_fraction | 0.1
3319- default_statistics_target | 100
3320- from_collapse_limit | 8
3321- join_collapse_limit | 8
3322- cpu_index_tuple_cost | 0.005
3323- cpu_operator_cost | 0.0025
3324- cpu_tuple_cost | 0.01
3325- effective_cache_size | 16384
3326- random_page_cost | 4
3327- seq_page_cost | 1
3328- enable_bitmapscan | on
3329- enable_hashagg | on
3330- enable_hashjoin | on
3331- enable_indexscan | on
3332- enable_material | on
3333- enable_mergejoin | on
3334- enable_nestloop | on
3335- enable_seqscan | on
3336- enable_sort | on
3337- enable_tidscan | on
3338- client_min_messages | log
3339-(29 rows)
3340-
3341-/*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3342-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3343-LOG: pg_hint_plan:
3344-used hint:
3345-SeqScan(t1)
3346-MergeJoin(t1 t2)
3347-Set(enable_seqscan off)
3348-Set(geqo_threshold 100)
3349-not used hint:
3350-duplication hint:
3351-error hint:
3352-
3353- QUERY PLAN
3354-------------------------------------
3355- Merge Join
3356- Merge Cond: (t1.c1 = t2.c1)
3357- -> Sort
3358- Sort Key: t1.c1
3359- -> Seq Scan on t1
3360- -> Index Scan using t2_i1 on t2
3361-(6 rows)
3362-
3363--- No. A-12-1-2
3364--- No. A-12-2-2
3365-SELECT name, setting FROM settings;
3366- name | setting
3367----------------------------+-----------
3368- geqo | on
3369- geqo_effort | 5
3370- geqo_generations | 0
3371- geqo_pool_size | 0
3372- geqo_seed | 0
3373- geqo_selection_bias | 2
3374- geqo_threshold | 12
3375- constraint_exclusion | partition
3376- cursor_tuple_fraction | 0.1
3377- default_statistics_target | 100
3378- from_collapse_limit | 8
3379- join_collapse_limit | 8
3380- cpu_index_tuple_cost | 0.005
3381- cpu_operator_cost | 0.0025
3382- cpu_tuple_cost | 0.01
3383- effective_cache_size | 16384
3384- random_page_cost | 4
3385- seq_page_cost | 1
3386- enable_bitmapscan | on
3387- enable_hashagg | on
3388- enable_hashjoin | on
3389- enable_indexscan | on
3390- enable_material | on
3391- enable_mergejoin | on
3392- enable_nestloop | on
3393- enable_seqscan | on
3394- enable_sort | on
3395- enable_tidscan | on
3396- client_min_messages | log
3397-(29 rows)
3398-
3399-SET pg_hint_plan.parse_messages TO error;
3400-/*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)NestLoop(t1 t1)*/
3401-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3402-ERROR: hint syntax error at or near "NestLoop(t1 t1)"
3403-DETAIL: Relation name "t1" is duplicated.
3404-SELECT name, setting FROM settings;
3405- name | setting
3406----------------------------+-----------
3407- geqo | on
3408- geqo_effort | 5
3409- geqo_generations | 0
3410- geqo_pool_size | 0
3411- geqo_seed | 0
3412- geqo_selection_bias | 2
3413- geqo_threshold | 12
3414- constraint_exclusion | partition
3415- cursor_tuple_fraction | 0.1
3416- default_statistics_target | 100
3417- from_collapse_limit | 8
3418- join_collapse_limit | 8
3419- cpu_index_tuple_cost | 0.005
3420- cpu_operator_cost | 0.0025
3421- cpu_tuple_cost | 0.01
3422- effective_cache_size | 16384
3423- random_page_cost | 4
3424- seq_page_cost | 1
3425- enable_bitmapscan | on
3426- enable_hashagg | on
3427- enable_hashjoin | on
3428- enable_indexscan | on
3429- enable_material | on
3430- enable_mergejoin | on
3431- enable_nestloop | on
3432- enable_seqscan | on
3433- enable_sort | on
3434- enable_tidscan | on
3435- client_min_messages | log
3436-(29 rows)
3437-
3438-EXPLAIN (COSTS false) EXECUTE p1;
3439- QUERY PLAN
3440-------------------------------------
3441- Merge Join
3442- Merge Cond: (t1.c1 = t2.c1)
3443- -> Sort
3444- Sort Key: t1.c1
3445- -> Seq Scan on t1
3446- -> Index Scan using t2_i1 on t2
3447-(6 rows)
3448-
3449--- No. A-12-1-3
3450--- No. A-12-2-3
3451-SELECT name, setting FROM settings;
3452- name | setting
3453----------------------------+-----------
3454- geqo | on
3455- geqo_effort | 5
3456- geqo_generations | 0
3457- geqo_pool_size | 0
3458- geqo_seed | 0
3459- geqo_selection_bias | 2
3460- geqo_threshold | 12
3461- constraint_exclusion | partition
3462- cursor_tuple_fraction | 0.1
3463- default_statistics_target | 100
3464- from_collapse_limit | 8
3465- join_collapse_limit | 8
3466- cpu_index_tuple_cost | 0.005
3467- cpu_operator_cost | 0.0025
3468- cpu_tuple_cost | 0.01
3469- effective_cache_size | 16384
3470- random_page_cost | 4
3471- seq_page_cost | 1
3472- enable_bitmapscan | on
3473- enable_hashagg | on
3474- enable_hashjoin | on
3475- enable_indexscan | on
3476- enable_material | on
3477- enable_mergejoin | on
3478- enable_nestloop | on
3479- enable_seqscan | on
3480- enable_sort | on
3481- enable_tidscan | on
3482- client_min_messages | log
3483-(29 rows)
3484-
3485-SET pg_hint_plan.parse_messages TO error;
3486-EXPLAIN (COSTS false) EXECUTE p2;
3487-ERROR: prepared statement "p2" does not exist
3488-/*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
3489-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3490-LOG: pg_hint_plan:
3491-used hint:
3492-SeqScan(t1)
3493-MergeJoin(t1 t2)
3494-Set(enable_seqscan off)
3495-Set(geqo_threshold 100)
3496-not used hint:
3497-duplication hint:
3498-error hint:
3499-
3500- QUERY PLAN
3501-------------------------------------
3502- Merge Join
3503- Merge Cond: (t1.c1 = t2.c1)
3504- -> Sort
3505- Sort Key: t1.c1
3506- -> Seq Scan on t1
3507- -> Index Scan using t2_i1 on t2
3508-(6 rows)
3509-
3510-EXPLAIN (COSTS false) EXECUTE p1;
3511- QUERY PLAN
3512-------------------------------------
3513- Merge Join
3514- Merge Cond: (t1.c1 = t2.c1)
3515- -> Sort
3516- Sort Key: t1.c1
3517- -> Seq Scan on t1
3518- -> Index Scan using t2_i1 on t2
3519-(6 rows)
3520-
3521-SELECT name, setting FROM settings;
3522- name | setting
3523----------------------------+-----------
3524- geqo | on
3525- geqo_effort | 5
3526- geqo_generations | 0
3527- geqo_pool_size | 0
3528- geqo_seed | 0
3529- geqo_selection_bias | 2
3530- geqo_threshold | 12
3531- constraint_exclusion | partition
3532- cursor_tuple_fraction | 0.1
3533- default_statistics_target | 100
3534- from_collapse_limit | 8
3535- join_collapse_limit | 8
3536- cpu_index_tuple_cost | 0.005
3537- cpu_operator_cost | 0.0025
3538- cpu_tuple_cost | 0.01
3539- effective_cache_size | 16384
3540- random_page_cost | 4
3541- seq_page_cost | 1
3542- enable_bitmapscan | on
3543- enable_hashagg | on
3544- enable_hashjoin | on
3545- enable_indexscan | on
3546- enable_material | on
3547- enable_mergejoin | on
3548- enable_nestloop | on
3549- enable_seqscan | on
3550- enable_sort | on
3551- enable_tidscan | on
3552- client_min_messages | log
3553-(29 rows)
3554-
3555--- No. A-12-1-4
3556--- No. A-12-2-4
3557-SELECT name, setting FROM settings;
3558- name | setting
3559----------------------------+-----------
3560- geqo | on
3561- geqo_effort | 5
3562- geqo_generations | 0
3563- geqo_pool_size | 0
3564- geqo_seed | 0
3565- geqo_selection_bias | 2
3566- geqo_threshold | 12
3567- constraint_exclusion | partition
3568- cursor_tuple_fraction | 0.1
3569- default_statistics_target | 100
3570- from_collapse_limit | 8
3571- join_collapse_limit | 8
3572- cpu_index_tuple_cost | 0.005
3573- cpu_operator_cost | 0.0025
3574- cpu_tuple_cost | 0.01
3575- effective_cache_size | 16384
3576- random_page_cost | 4
3577- seq_page_cost | 1
3578- enable_bitmapscan | on
3579- enable_hashagg | on
3580- enable_hashjoin | on
3581- enable_indexscan | on
3582- enable_material | on
3583- enable_mergejoin | on
3584- enable_nestloop | on
3585- enable_seqscan | on
3586- enable_sort | on
3587- enable_tidscan | on
3588- client_min_messages | log
3589-(29 rows)
3590-
3591-SET pg_hint_plan.parse_messages TO error;
3592-EXPLAIN (COSTS false) EXECUTE p2;
3593-ERROR: prepared statement "p2" does not exist
3594-EXPLAIN (COSTS false) EXECUTE p1;
3595- QUERY PLAN
3596-------------------------------------
3597- Merge Join
3598- Merge Cond: (t1.c1 = t2.c1)
3599- -> Sort
3600- Sort Key: t1.c1
3601- -> Seq Scan on t1
3602- -> Index Scan using t2_i1 on t2
3603-(6 rows)
3604-
3605-SELECT name, setting FROM settings;
3606- name | setting
3607----------------------------+-----------
3608- geqo | on
3609- geqo_effort | 5
3610- geqo_generations | 0
3611- geqo_pool_size | 0
3612- geqo_seed | 0
3613- geqo_selection_bias | 2
3614- geqo_threshold | 12
3615- constraint_exclusion | partition
3616- cursor_tuple_fraction | 0.1
3617- default_statistics_target | 100
3618- from_collapse_limit | 8
3619- join_collapse_limit | 8
3620- cpu_index_tuple_cost | 0.005
3621- cpu_operator_cost | 0.0025
3622- cpu_tuple_cost | 0.01
3623- effective_cache_size | 16384
3624- random_page_cost | 4
3625- seq_page_cost | 1
3626- enable_bitmapscan | on
3627- enable_hashagg | on
3628- enable_hashjoin | on
3629- enable_indexscan | on
3630- enable_material | on
3631- enable_mergejoin | on
3632- enable_nestloop | on
3633- enable_seqscan | on
3634- enable_sort | on
3635- enable_tidscan | on
3636- client_min_messages | log
3637-(29 rows)
3638-
3639-DEALLOCATE p1;
3640-SET pg_hint_plan.parse_messages TO LOG;
3641-----
3642----- No. A-12-3 effective range of the hint
3643-----
3644-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3645- QUERY PLAN
3646-------------------------------------
3647- Merge Join
3648- Merge Cond: (t1.c1 = t2.c1)
3649- -> Index Scan using t1_i1 on t1
3650- -> Sort
3651- Sort Key: t2.c1
3652- -> Seq Scan on t2
3653-(6 rows)
3654-
3655--- No. A-12-3-1
3656-SET enable_indexscan TO off;
3657-SET enable_mergejoin TO off;
3658-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3659- QUERY PLAN
3660-------------------------------
3661- Hash Join
3662- Hash Cond: (t1.c1 = t2.c1)
3663- -> Seq Scan on t1
3664- -> Hash
3665- -> Seq Scan on t2
3666-(5 rows)
3667-
3668-SELECT name, setting FROM settings;
3669- name | setting
3670----------------------------+-----------
3671- geqo | on
3672- geqo_effort | 5
3673- geqo_generations | 0
3674- geqo_pool_size | 0
3675- geqo_seed | 0
3676- geqo_selection_bias | 2
3677- geqo_threshold | 12
3678- constraint_exclusion | partition
3679- cursor_tuple_fraction | 0.1
3680- default_statistics_target | 100
3681- from_collapse_limit | 8
3682- join_collapse_limit | 8
3683- cpu_index_tuple_cost | 0.005
3684- cpu_operator_cost | 0.0025
3685- cpu_tuple_cost | 0.01
3686- effective_cache_size | 16384
3687- random_page_cost | 4
3688- seq_page_cost | 1
3689- enable_bitmapscan | on
3690- enable_hashagg | on
3691- enable_hashjoin | on
3692- enable_indexscan | off
3693- enable_material | on
3694- enable_mergejoin | off
3695- enable_nestloop | on
3696- enable_seqscan | on
3697- enable_sort | on
3698- enable_tidscan | on
3699- client_min_messages | log
3700-(29 rows)
3701-
3702-/*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3703-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3704-LOG: pg_hint_plan:
3705-used hint:
3706-IndexScan(t2)
3707-MergeJoin(t1 t2)
3708-Leading(t2 t1)
3709-Set(enable_indexscan on)
3710-Set(geqo_threshold 100)
3711-not used hint:
3712-duplication hint:
3713-error hint:
3714-
3715- QUERY PLAN
3716-------------------------------------
3717- Merge Join
3718- Merge Cond: (t1.c1 = t2.c1)
3719- -> Index Scan using t1_i1 on t1
3720- -> Index Scan using t2_i1 on t2
3721-(4 rows)
3722-
3723-SELECT name, setting FROM settings;
3724- name | setting
3725----------------------------+-----------
3726- geqo | on
3727- geqo_effort | 5
3728- geqo_generations | 0
3729- geqo_pool_size | 0
3730- geqo_seed | 0
3731- geqo_selection_bias | 2
3732- geqo_threshold | 12
3733- constraint_exclusion | partition
3734- cursor_tuple_fraction | 0.1
3735- default_statistics_target | 100
3736- from_collapse_limit | 8
3737- join_collapse_limit | 8
3738- cpu_index_tuple_cost | 0.005
3739- cpu_operator_cost | 0.0025
3740- cpu_tuple_cost | 0.01
3741- effective_cache_size | 16384
3742- random_page_cost | 4
3743- seq_page_cost | 1
3744- enable_bitmapscan | on
3745- enable_hashagg | on
3746- enable_hashjoin | on
3747- enable_indexscan | off
3748- enable_material | on
3749- enable_mergejoin | off
3750- enable_nestloop | on
3751- enable_seqscan | on
3752- enable_sort | on
3753- enable_tidscan | on
3754- client_min_messages | log
3755-(29 rows)
3756-
3757-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3758- QUERY PLAN
3759-------------------------------
3760- Hash Join
3761- Hash Cond: (t1.c1 = t2.c1)
3762- -> Seq Scan on t1
3763- -> Hash
3764- -> Seq Scan on t2
3765-(5 rows)
3766-
3767--- No. A-12-3-2
3768-SET enable_indexscan TO off;
3769-SET enable_mergejoin TO off;
3770-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3771- QUERY PLAN
3772-------------------------------
3773- Hash Join
3774- Hash Cond: (t1.c1 = t2.c1)
3775- -> Seq Scan on t1
3776- -> Hash
3777- -> Seq Scan on t2
3778-(5 rows)
3779-
3780-SELECT name, setting FROM settings;
3781- name | setting
3782----------------------------+-----------
3783- geqo | on
3784- geqo_effort | 5
3785- geqo_generations | 0
3786- geqo_pool_size | 0
3787- geqo_seed | 0
3788- geqo_selection_bias | 2
3789- geqo_threshold | 12
3790- constraint_exclusion | partition
3791- cursor_tuple_fraction | 0.1
3792- default_statistics_target | 100
3793- from_collapse_limit | 8
3794- join_collapse_limit | 8
3795- cpu_index_tuple_cost | 0.005
3796- cpu_operator_cost | 0.0025
3797- cpu_tuple_cost | 0.01
3798- effective_cache_size | 16384
3799- random_page_cost | 4
3800- seq_page_cost | 1
3801- enable_bitmapscan | on
3802- enable_hashagg | on
3803- enable_hashjoin | on
3804- enable_indexscan | off
3805- enable_material | on
3806- enable_mergejoin | off
3807- enable_nestloop | on
3808- enable_seqscan | on
3809- enable_sort | on
3810- enable_tidscan | on
3811- client_min_messages | log
3812-(29 rows)
3813-
3814-BEGIN;
3815-/*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3816-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3817-LOG: pg_hint_plan:
3818-used hint:
3819-IndexScan(t2)
3820-MergeJoin(t1 t2)
3821-Leading(t2 t1)
3822-Set(enable_indexscan on)
3823-Set(geqo_threshold 100)
3824-not used hint:
3825-duplication hint:
3826-error hint:
3827-
3828- QUERY PLAN
3829-------------------------------------
3830- Merge Join
3831- Merge Cond: (t1.c1 = t2.c1)
3832- -> Index Scan using t1_i1 on t1
3833- -> Index Scan using t2_i1 on t2
3834-(4 rows)
3835-
3836-COMMIT;
3837-BEGIN;
3838-SELECT name, setting FROM settings;
3839- name | setting
3840----------------------------+-----------
3841- geqo | on
3842- geqo_effort | 5
3843- geqo_generations | 0
3844- geqo_pool_size | 0
3845- geqo_seed | 0
3846- geqo_selection_bias | 2
3847- geqo_threshold | 12
3848- constraint_exclusion | partition
3849- cursor_tuple_fraction | 0.1
3850- default_statistics_target | 100
3851- from_collapse_limit | 8
3852- join_collapse_limit | 8
3853- cpu_index_tuple_cost | 0.005
3854- cpu_operator_cost | 0.0025
3855- cpu_tuple_cost | 0.01
3856- effective_cache_size | 16384
3857- random_page_cost | 4
3858- seq_page_cost | 1
3859- enable_bitmapscan | on
3860- enable_hashagg | on
3861- enable_hashjoin | on
3862- enable_indexscan | off
3863- enable_material | on
3864- enable_mergejoin | off
3865- enable_nestloop | on
3866- enable_seqscan | on
3867- enable_sort | on
3868- enable_tidscan | on
3869- client_min_messages | log
3870-(29 rows)
3871-
3872-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3873- QUERY PLAN
3874-------------------------------
3875- Hash Join
3876- Hash Cond: (t1.c1 = t2.c1)
3877- -> Seq Scan on t1
3878- -> Hash
3879- -> Seq Scan on t2
3880-(5 rows)
3881-
3882-COMMIT;
3883--- No. A-12-3-3
3884-SET enable_indexscan TO off;
3885-SET enable_mergejoin TO off;
3886-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3887- QUERY PLAN
3888-------------------------------
3889- Hash Join
3890- Hash Cond: (t1.c1 = t2.c1)
3891- -> Seq Scan on t1
3892- -> Hash
3893- -> Seq Scan on t2
3894-(5 rows)
3895-
3896-SELECT name, setting FROM settings;
3897- name | setting
3898----------------------------+-----------
3899- geqo | on
3900- geqo_effort | 5
3901- geqo_generations | 0
3902- geqo_pool_size | 0
3903- geqo_seed | 0
3904- geqo_selection_bias | 2
3905- geqo_threshold | 12
3906- constraint_exclusion | partition
3907- cursor_tuple_fraction | 0.1
3908- default_statistics_target | 100
3909- from_collapse_limit | 8
3910- join_collapse_limit | 8
3911- cpu_index_tuple_cost | 0.005
3912- cpu_operator_cost | 0.0025
3913- cpu_tuple_cost | 0.01
3914- effective_cache_size | 16384
3915- random_page_cost | 4
3916- seq_page_cost | 1
3917- enable_bitmapscan | on
3918- enable_hashagg | on
3919- enable_hashjoin | on
3920- enable_indexscan | off
3921- enable_material | on
3922- enable_mergejoin | off
3923- enable_nestloop | on
3924- enable_seqscan | on
3925- enable_sort | on
3926- enable_tidscan | on
3927- client_min_messages | log
3928-(29 rows)
3929-
3930-/*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
3931-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3932-LOG: pg_hint_plan:
3933-used hint:
3934-IndexScan(t2)
3935-MergeJoin(t1 t2)
3936-Leading(t2 t1)
3937-Set(enable_indexscan on)
3938-Set(geqo_threshold 100)
3939-not used hint:
3940-duplication hint:
3941-error hint:
3942-
3943- QUERY PLAN
3944-------------------------------------
3945- Merge Join
3946- Merge Cond: (t1.c1 = t2.c1)
3947- -> Index Scan using t1_i1 on t1
3948- -> Index Scan using t2_i1 on t2
3949-(4 rows)
3950-
3951-\connect
3952-SET enable_indexscan TO off;
3953-SET enable_mergejoin TO off;
3954-LOAD 'pg_hint_plan';
3955-SELECT name, setting FROM settings;
3956- name | setting
3957----------------------------+-----------
3958- geqo | on
3959- geqo_effort | 5
3960- geqo_generations | 0
3961- geqo_pool_size | 0
3962- geqo_seed | 0
3963- geqo_selection_bias | 2
3964- geqo_threshold | 12
3965- constraint_exclusion | partition
3966- cursor_tuple_fraction | 0.1
3967- default_statistics_target | 100
3968- from_collapse_limit | 8
3969- join_collapse_limit | 8
3970- cpu_index_tuple_cost | 0.005
3971- cpu_operator_cost | 0.0025
3972- cpu_tuple_cost | 0.01
3973- effective_cache_size | 16384
3974- random_page_cost | 4
3975- seq_page_cost | 1
3976- enable_bitmapscan | on
3977- enable_hashagg | on
3978- enable_hashjoin | on
3979- enable_indexscan | off
3980- enable_material | on
3981- enable_mergejoin | off
3982- enable_nestloop | on
3983- enable_seqscan | on
3984- enable_sort | on
3985- enable_tidscan | on
3986- client_min_messages | notice
3987-(29 rows)
3988-
3989-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
3990- QUERY PLAN
3991-------------------------------
3992- Hash Join
3993- Hash Cond: (t1.c1 = t2.c1)
3994- -> Seq Scan on t1
3995- -> Hash
3996- -> Seq Scan on t2
3997-(5 rows)
3998-
3999-SET pg_hint_plan.enable_hint TO on;
4000-SET pg_hint_plan.debug_print TO on;
4001-SET client_min_messages TO LOG;
4002-SET search_path TO public;
4003-RESET enable_indexscan;
4004-RESET enable_mergejoin;
4005-----
4006----- No. A-13 call planner recursively
4007-----
4008-CREATE OR REPLACE FUNCTION nested_planner(cnt int) RETURNS int AS $$
4009-DECLARE
4010- new_cnt int;
4011-BEGIN
4012- RAISE NOTICE 'nested_planner(%)', cnt;
4013-
4014- /* 再帰終了の判断 */
4015- IF cnt <= 1 THEN
4016- RETURN 0;
4017- END IF;
4018-
4019- SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) INTO new_cnt
4020- FROM s1.t1 t_1
4021- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4022- ORDER BY t_1.c1 LIMIT 1;
4023-
4024- RETURN new_cnt;
4025-END;
4026-$$ LANGUAGE plpgsql IMMUTABLE;
4027-----
4028----- No. A-13-2 use hint of main query
4029-----
4030---No.13-2-1
4031-EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4032-NOTICE: nested_planner(1)
4033- QUERY PLAN
4034-----------------------------------
4035- Index Scan using t1_i1 on t1 t_1
4036-(1 row)
4037-
4038-/*+SeqScan(t_1)*/
4039-EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4040-NOTICE: nested_planner(1)
4041-LOG: pg_hint_plan:
4042-used hint:
4043-SeqScan(t_1)
4044-not used hint:
4045-duplication hint:
4046-error hint:
4047-
4048- QUERY PLAN
4049---------------------------
4050- Sort
4051- Sort Key: c1
4052- -> Seq Scan on t1 t_1
4053-(3 rows)
4054-
4055-----
4056----- No. A-13-3 output number of times of debugging log
4057-----
4058---No.13-3-1
4059-EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4060-NOTICE: nested_planner(1)
4061- QUERY PLAN
4062-----------------------------------
4063- Index Scan using t1_i1 on t1 t_1
4064-(1 row)
4065-
4066-/*+SeqScan(t_2)*/
4067-EXPLAIN (COSTS false) SELECT nested_planner(1) FROM s1.t1 t_1 ORDER BY t_1.c1;
4068-NOTICE: nested_planner(1)
4069-LOG: pg_hint_plan:
4070-used hint:
4071-not used hint:
4072-SeqScan(t_2)
4073-duplication hint:
4074-error hint:
4075-
4076- QUERY PLAN
4077-----------------------------------
4078- Index Scan using t1_i1 on t1 t_1
4079-(1 row)
4080-
4081---No.13-3-2
4082-EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4083-NOTICE: nested_planner(2)
4084-LOG: pg_hint_plan:
4085-used hint:
4086-IndexScan(t_1)
4087-not used hint:
4088-duplication hint:
4089-error hint:
4090-
4091-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4092- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4093- ORDER BY t_1.c1 LIMIT 1"
4094-PL/pgSQL function "nested_planner" line 12 at SQL statement
4095-NOTICE: nested_planner(1)
4096-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4097- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4098- ORDER BY t_1.c1 LIMIT 1"
4099-PL/pgSQL function "nested_planner" line 12 at SQL statement
4100- QUERY PLAN
4101-----------------------------------
4102- Index Scan using t1_i1 on t1 t_1
4103-(1 row)
4104-
4105-/*+SeqScan(t_2)*/
4106-EXPLAIN (COSTS false) SELECT nested_planner(2) FROM s1.t1 t_1 ORDER BY t_1.c1;
4107-NOTICE: nested_planner(2)
4108-NOTICE: nested_planner(1)
4109-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4110- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4111- ORDER BY t_1.c1 LIMIT 1"
4112-PL/pgSQL function "nested_planner" line 12 at SQL statement
4113-LOG: pg_hint_plan:
4114-used hint:
4115-not used hint:
4116-SeqScan(t_2)
4117-duplication hint:
4118-error hint:
4119-
4120- QUERY PLAN
4121-----------------------------------
4122- Index Scan using t1_i1 on t1 t_1
4123-(1 row)
4124-
4125---No.13-3-3
4126-EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4127-NOTICE: nested_planner(5)
4128-NOTICE: nested_planner(4)
4129-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4130- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4131- ORDER BY t_1.c1 LIMIT 1"
4132-PL/pgSQL function "nested_planner" line 12 at SQL statement
4133-NOTICE: nested_planner(3)
4134-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4135- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4136- ORDER BY t_1.c1 LIMIT 1"
4137-PL/pgSQL function "nested_planner" line 12 at SQL statement
4138-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4139- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4140- ORDER BY t_1.c1 LIMIT 1"
4141-PL/pgSQL function "nested_planner" line 12 at SQL statement
4142-NOTICE: nested_planner(2)
4143-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4144- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4145- ORDER BY t_1.c1 LIMIT 1"
4146-PL/pgSQL function "nested_planner" line 12 at SQL statement
4147-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4148- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4149- ORDER BY t_1.c1 LIMIT 1"
4150-PL/pgSQL function "nested_planner" line 12 at SQL statement
4151-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4152- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4153- ORDER BY t_1.c1 LIMIT 1"
4154-PL/pgSQL function "nested_planner" line 12 at SQL statement
4155-NOTICE: nested_planner(1)
4156-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4157- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4158- ORDER BY t_1.c1 LIMIT 1"
4159-PL/pgSQL function "nested_planner" line 12 at SQL statement
4160-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4161- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4162- ORDER BY t_1.c1 LIMIT 1"
4163-PL/pgSQL function "nested_planner" line 12 at SQL statement
4164-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4165- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4166- ORDER BY t_1.c1 LIMIT 1"
4167-PL/pgSQL function "nested_planner" line 12 at SQL statement
4168-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4169- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4170- ORDER BY t_1.c1 LIMIT 1"
4171-PL/pgSQL function "nested_planner" line 12 at SQL statement
4172- QUERY PLAN
4173-----------------------------------
4174- Index Scan using t1_i1 on t1 t_1
4175-(1 row)
4176-
4177-/*+SeqScan(t_2)*/
4178-EXPLAIN (COSTS false) SELECT nested_planner(5) FROM s1.t1 t_1 ORDER BY t_1.c1;
4179-NOTICE: nested_planner(5)
4180-NOTICE: nested_planner(4)
4181-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4182- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4183- ORDER BY t_1.c1 LIMIT 1"
4184-PL/pgSQL function "nested_planner" line 12 at SQL statement
4185-NOTICE: nested_planner(3)
4186-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4187- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4188- ORDER BY t_1.c1 LIMIT 1"
4189-PL/pgSQL function "nested_planner" line 12 at SQL statement
4190-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4191- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4192- ORDER BY t_1.c1 LIMIT 1"
4193-PL/pgSQL function "nested_planner" line 12 at SQL statement
4194-NOTICE: nested_planner(2)
4195-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4196- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4197- ORDER BY t_1.c1 LIMIT 1"
4198-PL/pgSQL function "nested_planner" line 12 at SQL statement
4199-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4200- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4201- ORDER BY t_1.c1 LIMIT 1"
4202-PL/pgSQL function "nested_planner" line 12 at SQL statement
4203-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4204- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4205- ORDER BY t_1.c1 LIMIT 1"
4206-PL/pgSQL function "nested_planner" line 12 at SQL statement
4207-NOTICE: nested_planner(1)
4208-CONTEXT: SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4209- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4210- ORDER BY t_1.c1 LIMIT 1"
4211-PL/pgSQL function "nested_planner" line 12 at SQL statement
4212-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4213- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4214- ORDER BY t_1.c1 LIMIT 1"
4215-PL/pgSQL function "nested_planner" line 12 at SQL statement
4216-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4217- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4218- ORDER BY t_1.c1 LIMIT 1"
4219-PL/pgSQL function "nested_planner" line 12 at SQL statement
4220-SQL statement "SELECT /*+ IndexScan(t_1) */ nested_planner(cnt - 1) FROM s1.t1 t_1
4221- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4222- ORDER BY t_1.c1 LIMIT 1"
4223-PL/pgSQL function "nested_planner" line 12 at SQL statement
4224-LOG: pg_hint_plan:
4225-used hint:
4226-not used hint:
4227-SeqScan(t_2)
4228-duplication hint:
4229-error hint:
4230-
4231- QUERY PLAN
4232-----------------------------------
4233- Index Scan using t1_i1 on t1 t_1
4234-(1 row)
4235-
4236-----
4237----- No. A-13-4 output of debugging log on hint status
4238-----
4239-CREATE OR REPLACE FUNCTION recall_planner() RETURNS int AS $$
4240- SELECT /*+ IndexScan(t_1) */t_1.c1
4241- FROM s1.t1 t_1
4242- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4243- ORDER BY t_1.c1 LIMIT 1;
4244-$$ LANGUAGE SQL IMMUTABLE;
4245---No.13-4-1
4246-/*+HashJoin(t_1 t_2)*/
4247-EXPLAIN (COSTS false)
4248- SELECT recall_planner() FROM s1.t1 t_1
4249- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4250- ORDER BY t_1.c1;
4251-LOG: pg_hint_plan:
4252-used hint:
4253-HashJoin(t_1 t_2)
4254-not used hint:
4255-duplication hint:
4256-error hint:
4257-
4258-CONTEXT: SQL function "recall_planner" during startup
4259-LOG: pg_hint_plan:
4260-used hint:
4261-HashJoin(t_1 t_2)
4262-not used hint:
4263-duplication hint:
4264-error hint:
4265-
4266- QUERY PLAN
4267---------------------------------------
4268- Sort
4269- Sort Key: t_1.c1
4270- -> Hash Join
4271- Hash Cond: (t_1.c1 = t_2.c1)
4272- -> Seq Scan on t1 t_1
4273- -> Hash
4274- -> Seq Scan on t2 t_2
4275-(7 rows)
4276-
4277---No.13-4-2
4278-/*+HashJoin(st_1 st_2)*/
4279-EXPLAIN (COSTS false)
4280- SELECT recall_planner() FROM s1.t1 st_1
4281- JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4282- ORDER BY st_1.c1;
4283-LOG: pg_hint_plan:
4284-used hint:
4285-not used hint:
4286-HashJoin(st_1 st_2)
4287-duplication hint:
4288-error hint:
4289-
4290-CONTEXT: SQL function "recall_planner" during startup
4291-LOG: pg_hint_plan:
4292-used hint:
4293-HashJoin(st_1 st_2)
4294-not used hint:
4295-duplication hint:
4296-error hint:
4297-
4298- QUERY PLAN
4299-----------------------------------------
4300- Sort
4301- Sort Key: st_1.c1
4302- -> Hash Join
4303- Hash Cond: (st_1.c1 = st_2.c1)
4304- -> Seq Scan on t1 st_1
4305- -> Hash
4306- -> Seq Scan on t2 st_2
4307-(7 rows)
4308-
4309---No.13-4-3
4310-/*+HashJoin(t_1 t_2)*/
4311-EXPLAIN (COSTS false)
4312- SELECT recall_planner() FROM s1.t1 st_1
4313- JOIN s1.t2 st_2 ON (st_1.c1 = st_2.c1)
4314- ORDER BY st_1.c1;
4315-LOG: pg_hint_plan:
4316-used hint:
4317-HashJoin(t_1 t_2)
4318-not used hint:
4319-duplication hint:
4320-error hint:
4321-
4322-CONTEXT: SQL function "recall_planner" during startup
4323-LOG: pg_hint_plan:
4324-used hint:
4325-not used hint:
4326-HashJoin(t_1 t_2)
4327-duplication hint:
4328-error hint:
4329-
4330- QUERY PLAN
4331------------------------------------------
4332- Merge Join
4333- Merge Cond: (st_1.c1 = st_2.c1)
4334- -> Index Scan using t1_i1 on t1 st_1
4335- -> Sort
4336- Sort Key: st_2.c1
4337- -> Seq Scan on t2 st_2
4338-(6 rows)
4339-
4340---No.13-4-4
4341-/*+HashJoin(st_1 st_2)*/
4342-EXPLAIN (COSTS false)
4343- SELECT recall_planner() FROM s1.t1 t_1
4344- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4345- ORDER BY t_1.c1;
4346-LOG: pg_hint_plan:
4347-used hint:
4348-not used hint:
4349-HashJoin(st_1 st_2)
4350-duplication hint:
4351-error hint:
4352-
4353-CONTEXT: SQL function "recall_planner" during startup
4354-LOG: pg_hint_plan:
4355-used hint:
4356-not used hint:
4357-HashJoin(st_1 st_2)
4358-duplication hint:
4359-error hint:
4360-
4361- QUERY PLAN
4362-----------------------------------------
4363- Merge Join
4364- Merge Cond: (t_1.c1 = t_2.c1)
4365- -> Index Scan using t1_i1 on t1 t_1
4366- -> Sort
4367- Sort Key: t_2.c1
4368- -> Seq Scan on t2 t_2
4369-(6 rows)
4370-
4371---No.13-4-5
4372-/*+HashJoin(t_1 t_1)*/
4373-EXPLAIN (COSTS false)
4374- SELECT recall_planner() FROM s1.t1 t_1
4375- ORDER BY t_1.c1;
4376-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4377-DETAIL: Relation name "t_1" is duplicated.
4378-CONTEXT: SQL function "recall_planner" during startup
4379-LOG: pg_hint_plan:
4380-used hint:
4381-not used hint:
4382-duplication hint:
4383-error hint:
4384-HashJoin(t_1 t_1)
4385-
4386-CONTEXT: SQL function "recall_planner" during startup
4387-LOG: pg_hint_plan:
4388-used hint:
4389-not used hint:
4390-HashJoin(t_1 t_1)
4391-duplication hint:
4392-error hint:
4393-
4394- QUERY PLAN
4395-----------------------------------
4396- Index Scan using t1_i1 on t1 t_1
4397-(1 row)
4398-
4399---No.13-4-6
4400-CREATE OR REPLACE FUNCTION recall_planner_one_t() RETURNS int AS $$
4401- SELECT /*+ IndexScan(t_1) */t_1.c1
4402- FROM s1.t1 t_1
4403- ORDER BY t_1.c1 LIMIT 1;
4404-$$ LANGUAGE SQL IMMUTABLE;
4405-EXPLAIN (COSTS false)
4406- SELECT recall_planner_one_t() FROM s1.t1 t_1
4407- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4408- ORDER BY t_1.c1;
4409- QUERY PLAN
4410-----------------------------------------
4411- Merge Join
4412- Merge Cond: (t_1.c1 = t_2.c1)
4413- -> Index Scan using t1_i1 on t1 t_1
4414- -> Sort
4415- Sort Key: t_2.c1
4416- -> Seq Scan on t2 t_2
4417-(6 rows)
4418-
4419-/*+HashJoin(t_1 t_1)*/
4420-EXPLAIN (COSTS false)
4421- SELECT recall_planner_one_t() FROM s1.t1 t_1
4422- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4423- ORDER BY t_1.c1;
4424-LOG: pg_hint_plan:
4425-used hint:
4426-not used hint:
4427-HashJoin(t_1 t_1)
4428-duplication hint:
4429-error hint:
4430-
4431-CONTEXT: SQL function "recall_planner_one_t" during startup
4432-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4433-DETAIL: Relation name "t_1" is duplicated.
4434-LOG: pg_hint_plan:
4435-used hint:
4436-not used hint:
4437-duplication hint:
4438-error hint:
4439-HashJoin(t_1 t_1)
4440-
4441- QUERY PLAN
4442-----------------------------------------
4443- Merge Join
4444- Merge Cond: (t_1.c1 = t_2.c1)
4445- -> Index Scan using t1_i1 on t1 t_1
4446- -> Sort
4447- Sort Key: t_2.c1
4448- -> Seq Scan on t2 t_2
4449-(6 rows)
4450-
4451-DROP FUNCTION recall_planner_one_t(int);
4452-ERROR: function recall_planner_one_t(integer) does not exist
4453---No.13-4-7
4454-/*+HashJoin(t_1 t_1)*/
4455-EXPLAIN (COSTS false)
4456- SELECT recall_planner() FROM s1.t1 t_1
4457- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4458- ORDER BY t_1.c1;
4459-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4460-DETAIL: Relation name "t_1" is duplicated.
4461-CONTEXT: SQL function "recall_planner" during startup
4462-LOG: pg_hint_plan:
4463-used hint:
4464-not used hint:
4465-duplication hint:
4466-error hint:
4467-HashJoin(t_1 t_1)
4468-
4469-CONTEXT: SQL function "recall_planner" during startup
4470-INFO: hint syntax error at or near "HashJoin(t_1 t_1)"
4471-DETAIL: Relation name "t_1" is duplicated.
4472-LOG: pg_hint_plan:
4473-used hint:
4474-not used hint:
4475-duplication hint:
4476-error hint:
4477-HashJoin(t_1 t_1)
4478-
4479- QUERY PLAN
4480-----------------------------------------
4481- Merge Join
4482- Merge Cond: (t_1.c1 = t_2.c1)
4483- -> Index Scan using t1_i1 on t1 t_1
4484- -> Sort
4485- Sort Key: t_2.c1
4486- -> Seq Scan on t2 t_2
4487-(6 rows)
4488-
4489---No.13-4-8
4490-/*+MergeJoin(t_1 t_2)HashJoin(t_1 t_2)*/
4491-EXPLAIN (COSTS false)
4492- SELECT recall_planner() FROM s1.t1 t_1
4493- JOIN s1.t2 t_2 ON (t_1.c1 = t_2.c1)
4494- ORDER BY t_1.c1;
4495-INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4496-DETAIL: Conflict join method hint.
4497-INFO: hint syntax error at or near "MergeJoin(t_1 t_2)HashJoin(t_1 t_2)"
4498-DETAIL: Conflict join method hint.
4499-CONTEXT: SQL function "recall_planner" during startup
4500-LOG: pg_hint_plan:
4501-used hint:
4502-HashJoin(t_1 t_2)
4503-not used hint:
4504-duplication hint:
4505-MergeJoin(t_1 t_2)
4506-error hint:
4507-
4508-CONTEXT: SQL function "recall_planner" during startup
4509-LOG: pg_hint_plan:
4510-used hint:
4511-HashJoin(t_1 t_2)
4512-not used hint:
4513-duplication hint:
4514-MergeJoin(t_1 t_2)
4515-error hint:
4516-
4517- QUERY PLAN
4518---------------------------------------
4519- Sort
4520- Sort Key: t_1.c1
4521- -> Hash Join
4522- Hash Cond: (t_1.c1 = t_2.c1)
4523- -> Seq Scan on t1 t_1
4524- -> Hash
4525- -> Seq Scan on t2 t_2
4526-(7 rows)
4527-
--- a/expected/ut-G-9.1.out
+++ /dev/null
@@ -1,878 +0,0 @@
1-LOAD 'pg_hint_plan';
2-SET pg_hint_plan.enable_hint TO on;
3-SET pg_hint_plan.debug_print TO on;
4-SET client_min_messages TO LOG;
5-SET search_path TO public;
6-----
7----- No. G-1-1 RULE definition table
8-----
9--- No. G-1-1-1
10-EXPLAIN (COSTS false) UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
11- QUERY PLAN
12------------------------------------------------------------------
13- Aggregate
14- -> Nested Loop
15- Join Filter: (t1.c1 = t4.c1)
16- -> Nested Loop
17- Join Filter: (t1.c1 = t3.c1)
18- -> Nested Loop
19- Join Filter: (t2.c1 = t1.c1)
20- -> Nested Loop
21- -> Tid Scan on r1
22- TID Cond: (ctid = '(1,1)'::tid)
23- Filter: (c1 = 1)
24- -> Seq Scan on t2
25- Filter: (ctid = '(1,1)'::tid)
26- -> Tid Scan on t1
27- TID Cond: (ctid = '(1,1)'::tid)
28- -> Tid Scan on t3
29- TID Cond: (ctid = '(1,1)'::tid)
30- -> Tid Scan on t4
31- TID Cond: (ctid = '(1,1)'::tid)
32-(19 rows)
33-
34-/*+
35-Set(enable_tidscan off)Set(enable_nestloop off)
36-*/
37-EXPLAIN (COSTS false) UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
38-LOG: pg_hint_plan:
39-used hint:
40-Set(enable_nestloop off)
41-Set(enable_tidscan off)
42-not used hint:
43-duplication hint:
44-error hint:
45-
46- QUERY PLAN
47----------------------------------------------------------------------
48- Aggregate
49- -> Nested Loop
50- -> Hash Join
51- Hash Cond: (t1.c1 = t4.c1)
52- -> Hash Join
53- Hash Cond: (t2.c1 = t1.c1)
54- -> Hash Join
55- Hash Cond: (t3.c1 = t2.c1)
56- -> Seq Scan on t3
57- Filter: (ctid = '(1,1)'::tid)
58- -> Hash
59- -> Seq Scan on t2
60- Filter: (ctid = '(1,1)'::tid)
61- -> Hash
62- -> Seq Scan on t1
63- Filter: (ctid = '(1,1)'::tid)
64- -> Hash
65- -> Seq Scan on t4
66- Filter: (ctid = '(1,1)'::tid)
67- -> Seq Scan on r1
68- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
69-(21 rows)
70-
71-EXPLAIN (COSTS false) UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
72- QUERY PLAN
73------------------------------------------------------------------
74- Aggregate
75- -> Nested Loop
76- Join Filter: (b1t1.c1 = b1t4.c1)
77- -> Nested Loop
78- Join Filter: (b1t1.c1 = b1t3.c1)
79- -> Nested Loop
80- Join Filter: (b1t2.c1 = b1t1.c1)
81- -> Nested Loop
82- -> Tid Scan on r1_
83- TID Cond: (ctid = '(1,1)'::tid)
84- Filter: (c1 = 1)
85- -> Seq Scan on t2 b1t2
86- Filter: (ctid = '(1,1)'::tid)
87- -> Tid Scan on t1 b1t1
88- TID Cond: (ctid = '(1,1)'::tid)
89- -> Tid Scan on t3 b1t3
90- TID Cond: (ctid = '(1,1)'::tid)
91- -> Tid Scan on t4 b1t4
92- TID Cond: (ctid = '(1,1)'::tid)
93-(19 rows)
94-
95-/*+
96-Set(enable_tidscan off)Set(enable_nestloop off)
97-*/
98-EXPLAIN (COSTS false) UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
99-LOG: pg_hint_plan:
100-used hint:
101-Set(enable_nestloop off)
102-Set(enable_tidscan off)
103-not used hint:
104-duplication hint:
105-error hint:
106-
107- QUERY PLAN
108----------------------------------------------------------------------
109- Aggregate
110- -> Nested Loop
111- -> Hash Join
112- Hash Cond: (b1t1.c1 = b1t4.c1)
113- -> Hash Join
114- Hash Cond: (b1t2.c1 = b1t1.c1)
115- -> Hash Join
116- Hash Cond: (b1t3.c1 = b1t2.c1)
117- -> Seq Scan on t3 b1t3
118- Filter: (ctid = '(1,1)'::tid)
119- -> Hash
120- -> Seq Scan on t2 b1t2
121- Filter: (ctid = '(1,1)'::tid)
122- -> Hash
123- -> Seq Scan on t1 b1t1
124- Filter: (ctid = '(1,1)'::tid)
125- -> Hash
126- -> Seq Scan on t4 b1t4
127- Filter: (ctid = '(1,1)'::tid)
128- -> Seq Scan on r1_
129- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
130-(21 rows)
131-
132--- No. G-1-1-2
133-EXPLAIN (COSTS false) UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
134- QUERY PLAN
135------------------------------------------------------------------
136- Aggregate
137- -> Nested Loop
138- Join Filter: (t1.c1 = t4.c1)
139- -> Nested Loop
140- Join Filter: (t1.c1 = t3.c1)
141- -> Nested Loop
142- Join Filter: (t2.c1 = t1.c1)
143- -> Nested Loop
144- -> Tid Scan on r2
145- TID Cond: (ctid = '(1,1)'::tid)
146- Filter: (c1 = 1)
147- -> Seq Scan on t2
148- Filter: (ctid = '(1,1)'::tid)
149- -> Tid Scan on t1
150- TID Cond: (ctid = '(1,1)'::tid)
151- -> Tid Scan on t3
152- TID Cond: (ctid = '(1,1)'::tid)
153- -> Tid Scan on t4
154- TID Cond: (ctid = '(1,1)'::tid)
155-
156- Aggregate
157- -> Nested Loop
158- Join Filter: (t1.c1 = t4.c1)
159- -> Nested Loop
160- Join Filter: (t1.c1 = t3.c1)
161- -> Nested Loop
162- Join Filter: (t2.c1 = t1.c1)
163- -> Nested Loop
164- -> Tid Scan on r2
165- TID Cond: (ctid = '(1,1)'::tid)
166- Filter: (c1 = 1)
167- -> Seq Scan on t2
168- Filter: (ctid = '(1,1)'::tid)
169- -> Tid Scan on t1
170- TID Cond: (ctid = '(1,1)'::tid)
171- -> Tid Scan on t3
172- TID Cond: (ctid = '(1,1)'::tid)
173- -> Tid Scan on t4
174- TID Cond: (ctid = '(1,1)'::tid)
175-(39 rows)
176-
177-/*+
178-Set(enable_tidscan off)Set(enable_nestloop off)
179-*/
180-EXPLAIN (COSTS false) UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
181-LOG: pg_hint_plan:
182-used hint:
183-Set(enable_nestloop off)
184-Set(enable_tidscan off)
185-not used hint:
186-duplication hint:
187-error hint:
188-
189-LOG: pg_hint_plan:
190-used hint:
191-Set(enable_nestloop off)
192-Set(enable_tidscan off)
193-not used hint:
194-duplication hint:
195-error hint:
196-
197- QUERY PLAN
198----------------------------------------------------------------------
199- Aggregate
200- -> Nested Loop
201- -> Hash Join
202- Hash Cond: (t1.c1 = t4.c1)
203- -> Hash Join
204- Hash Cond: (t2.c1 = t1.c1)
205- -> Hash Join
206- Hash Cond: (t3.c1 = t2.c1)
207- -> Seq Scan on t3
208- Filter: (ctid = '(1,1)'::tid)
209- -> Hash
210- -> Seq Scan on t2
211- Filter: (ctid = '(1,1)'::tid)
212- -> Hash
213- -> Seq Scan on t1
214- Filter: (ctid = '(1,1)'::tid)
215- -> Hash
216- -> Seq Scan on t4
217- Filter: (ctid = '(1,1)'::tid)
218- -> Seq Scan on r2
219- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
220-
221- Aggregate
222- -> Nested Loop
223- -> Hash Join
224- Hash Cond: (t1.c1 = t4.c1)
225- -> Hash Join
226- Hash Cond: (t2.c1 = t1.c1)
227- -> Hash Join
228- Hash Cond: (t3.c1 = t2.c1)
229- -> Seq Scan on t3
230- Filter: (ctid = '(1,1)'::tid)
231- -> Hash
232- -> Seq Scan on t2
233- Filter: (ctid = '(1,1)'::tid)
234- -> Hash
235- -> Seq Scan on t1
236- Filter: (ctid = '(1,1)'::tid)
237- -> Hash
238- -> Seq Scan on t4
239- Filter: (ctid = '(1,1)'::tid)
240- -> Seq Scan on r2
241- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
242-(43 rows)
243-
244-EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
245- QUERY PLAN
246------------------------------------------------------------------
247- Aggregate
248- -> Nested Loop
249- Join Filter: (b1t1.c1 = b1t4.c1)
250- -> Nested Loop
251- Join Filter: (b1t1.c1 = b1t3.c1)
252- -> Nested Loop
253- Join Filter: (b1t2.c1 = b1t1.c1)
254- -> Nested Loop
255- -> Tid Scan on r2_
256- TID Cond: (ctid = '(1,1)'::tid)
257- Filter: (c1 = 1)
258- -> Seq Scan on t2 b1t2
259- Filter: (ctid = '(1,1)'::tid)
260- -> Tid Scan on t1 b1t1
261- TID Cond: (ctid = '(1,1)'::tid)
262- -> Tid Scan on t3 b1t3
263- TID Cond: (ctid = '(1,1)'::tid)
264- -> Tid Scan on t4 b1t4
265- TID Cond: (ctid = '(1,1)'::tid)
266-
267- Aggregate
268- -> Nested Loop
269- Join Filter: (b2t1.c1 = b2t4.c1)
270- -> Nested Loop
271- Join Filter: (b2t1.c1 = b2t3.c1)
272- -> Nested Loop
273- Join Filter: (b2t2.c1 = b2t1.c1)
274- -> Nested Loop
275- -> Tid Scan on r2_
276- TID Cond: (ctid = '(1,1)'::tid)
277- Filter: (c1 = 1)
278- -> Seq Scan on t2 b2t2
279- Filter: (ctid = '(1,1)'::tid)
280- -> Tid Scan on t1 b2t1
281- TID Cond: (ctid = '(1,1)'::tid)
282- -> Tid Scan on t3 b2t3
283- TID Cond: (ctid = '(1,1)'::tid)
284- -> Tid Scan on t4 b2t4
285- TID Cond: (ctid = '(1,1)'::tid)
286-(39 rows)
287-
288-/*+
289-Set(enable_tidscan off)Set(enable_nestloop off)
290-*/
291-EXPLAIN (COSTS false) UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
292-LOG: pg_hint_plan:
293-used hint:
294-Set(enable_nestloop off)
295-Set(enable_tidscan off)
296-not used hint:
297-duplication hint:
298-error hint:
299-
300-LOG: pg_hint_plan:
301-used hint:
302-Set(enable_nestloop off)
303-Set(enable_tidscan off)
304-not used hint:
305-duplication hint:
306-error hint:
307-
308- QUERY PLAN
309----------------------------------------------------------------------
310- Aggregate
311- -> Nested Loop
312- -> Hash Join
313- Hash Cond: (b1t1.c1 = b1t4.c1)
314- -> Hash Join
315- Hash Cond: (b1t2.c1 = b1t1.c1)
316- -> Hash Join
317- Hash Cond: (b1t3.c1 = b1t2.c1)
318- -> Seq Scan on t3 b1t3
319- Filter: (ctid = '(1,1)'::tid)
320- -> Hash
321- -> Seq Scan on t2 b1t2
322- Filter: (ctid = '(1,1)'::tid)
323- -> Hash
324- -> Seq Scan on t1 b1t1
325- Filter: (ctid = '(1,1)'::tid)
326- -> Hash
327- -> Seq Scan on t4 b1t4
328- Filter: (ctid = '(1,1)'::tid)
329- -> Seq Scan on r2_
330- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
331-
332- Aggregate
333- -> Nested Loop
334- -> Hash Join
335- Hash Cond: (b2t1.c1 = b2t4.c1)
336- -> Hash Join
337- Hash Cond: (b2t2.c1 = b2t1.c1)
338- -> Hash Join
339- Hash Cond: (b2t3.c1 = b2t2.c1)
340- -> Seq Scan on t3 b2t3
341- Filter: (ctid = '(1,1)'::tid)
342- -> Hash
343- -> Seq Scan on t2 b2t2
344- Filter: (ctid = '(1,1)'::tid)
345- -> Hash
346- -> Seq Scan on t1 b2t1
347- Filter: (ctid = '(1,1)'::tid)
348- -> Hash
349- -> Seq Scan on t4 b2t4
350- Filter: (ctid = '(1,1)'::tid)
351- -> Seq Scan on r2_
352- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
353-(43 rows)
354-
355--- No. G-1-1-3
356-EXPLAIN (COSTS false) UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
357- QUERY PLAN
358------------------------------------------------------------------
359- Aggregate
360- -> Nested Loop
361- Join Filter: (t1.c1 = t4.c1)
362- -> Nested Loop
363- Join Filter: (t1.c1 = t3.c1)
364- -> Nested Loop
365- Join Filter: (t2.c1 = t1.c1)
366- -> Nested Loop
367- -> Tid Scan on r3
368- TID Cond: (ctid = '(1,1)'::tid)
369- Filter: (c1 = 1)
370- -> Seq Scan on t2
371- Filter: (ctid = '(1,1)'::tid)
372- -> Tid Scan on t1
373- TID Cond: (ctid = '(1,1)'::tid)
374- -> Tid Scan on t3
375- TID Cond: (ctid = '(1,1)'::tid)
376- -> Tid Scan on t4
377- TID Cond: (ctid = '(1,1)'::tid)
378-
379- Aggregate
380- -> Nested Loop
381- Join Filter: (t1.c1 = t4.c1)
382- -> Nested Loop
383- Join Filter: (t1.c1 = t3.c1)
384- -> Nested Loop
385- Join Filter: (t2.c1 = t1.c1)
386- -> Nested Loop
387- -> Tid Scan on r3
388- TID Cond: (ctid = '(1,1)'::tid)
389- Filter: (c1 = 1)
390- -> Seq Scan on t2
391- Filter: (ctid = '(1,1)'::tid)
392- -> Tid Scan on t1
393- TID Cond: (ctid = '(1,1)'::tid)
394- -> Tid Scan on t3
395- TID Cond: (ctid = '(1,1)'::tid)
396- -> Tid Scan on t4
397- TID Cond: (ctid = '(1,1)'::tid)
398-
399- Aggregate
400- -> Nested Loop
401- Join Filter: (t1.c1 = t4.c1)
402- -> Nested Loop
403- Join Filter: (t1.c1 = t3.c1)
404- -> Nested Loop
405- Join Filter: (t2.c1 = t1.c1)
406- -> Nested Loop
407- -> Tid Scan on r3
408- TID Cond: (ctid = '(1,1)'::tid)
409- Filter: (c1 = 1)
410- -> Seq Scan on t2
411- Filter: (ctid = '(1,1)'::tid)
412- -> Tid Scan on t1
413- TID Cond: (ctid = '(1,1)'::tid)
414- -> Tid Scan on t3
415- TID Cond: (ctid = '(1,1)'::tid)
416- -> Tid Scan on t4
417- TID Cond: (ctid = '(1,1)'::tid)
418-(59 rows)
419-
420-/*+
421-Set(enable_tidscan off)Set(enable_nestloop off)
422-*/
423-EXPLAIN (COSTS false) UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
424-LOG: pg_hint_plan:
425-used hint:
426-Set(enable_nestloop off)
427-Set(enable_tidscan off)
428-not used hint:
429-duplication hint:
430-error hint:
431-
432-LOG: pg_hint_plan:
433-used hint:
434-Set(enable_nestloop off)
435-Set(enable_tidscan off)
436-not used hint:
437-duplication hint:
438-error hint:
439-
440-LOG: pg_hint_plan:
441-used hint:
442-Set(enable_nestloop off)
443-Set(enable_tidscan off)
444-not used hint:
445-duplication hint:
446-error hint:
447-
448- QUERY PLAN
449----------------------------------------------------------------------
450- Aggregate
451- -> Nested Loop
452- -> Hash Join
453- Hash Cond: (t1.c1 = t4.c1)
454- -> Hash Join
455- Hash Cond: (t2.c1 = t1.c1)
456- -> Hash Join
457- Hash Cond: (t3.c1 = t2.c1)
458- -> Seq Scan on t3
459- Filter: (ctid = '(1,1)'::tid)
460- -> Hash
461- -> Seq Scan on t2
462- Filter: (ctid = '(1,1)'::tid)
463- -> Hash
464- -> Seq Scan on t1
465- Filter: (ctid = '(1,1)'::tid)
466- -> Hash
467- -> Seq Scan on t4
468- Filter: (ctid = '(1,1)'::tid)
469- -> Seq Scan on r3
470- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
471-
472- Aggregate
473- -> Nested Loop
474- -> Hash Join
475- Hash Cond: (t1.c1 = t4.c1)
476- -> Hash Join
477- Hash Cond: (t2.c1 = t1.c1)
478- -> Hash Join
479- Hash Cond: (t3.c1 = t2.c1)
480- -> Seq Scan on t3
481- Filter: (ctid = '(1,1)'::tid)
482- -> Hash
483- -> Seq Scan on t2
484- Filter: (ctid = '(1,1)'::tid)
485- -> Hash
486- -> Seq Scan on t1
487- Filter: (ctid = '(1,1)'::tid)
488- -> Hash
489- -> Seq Scan on t4
490- Filter: (ctid = '(1,1)'::tid)
491- -> Seq Scan on r3
492- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
493-
494- Aggregate
495- -> Nested Loop
496- -> Hash Join
497- Hash Cond: (t1.c1 = t4.c1)
498- -> Hash Join
499- Hash Cond: (t2.c1 = t1.c1)
500- -> Hash Join
501- Hash Cond: (t3.c1 = t2.c1)
502- -> Seq Scan on t3
503- Filter: (ctid = '(1,1)'::tid)
504- -> Hash
505- -> Seq Scan on t2
506- Filter: (ctid = '(1,1)'::tid)
507- -> Hash
508- -> Seq Scan on t1
509- Filter: (ctid = '(1,1)'::tid)
510- -> Hash
511- -> Seq Scan on t4
512- Filter: (ctid = '(1,1)'::tid)
513- -> Seq Scan on r3
514- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
515-(65 rows)
516-
517-EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
518- QUERY PLAN
519------------------------------------------------------------------
520- Aggregate
521- -> Nested Loop
522- Join Filter: (b1t1.c1 = b1t4.c1)
523- -> Nested Loop
524- Join Filter: (b1t1.c1 = b1t3.c1)
525- -> Nested Loop
526- Join Filter: (b1t2.c1 = b1t1.c1)
527- -> Nested Loop
528- -> Tid Scan on r3_
529- TID Cond: (ctid = '(1,1)'::tid)
530- Filter: (c1 = 1)
531- -> Seq Scan on t2 b1t2
532- Filter: (ctid = '(1,1)'::tid)
533- -> Tid Scan on t1 b1t1
534- TID Cond: (ctid = '(1,1)'::tid)
535- -> Tid Scan on t3 b1t3
536- TID Cond: (ctid = '(1,1)'::tid)
537- -> Tid Scan on t4 b1t4
538- TID Cond: (ctid = '(1,1)'::tid)
539-
540- Aggregate
541- -> Nested Loop
542- Join Filter: (b2t1.c1 = b2t4.c1)
543- -> Nested Loop
544- Join Filter: (b2t1.c1 = b2t3.c1)
545- -> Nested Loop
546- Join Filter: (b2t2.c1 = b2t1.c1)
547- -> Nested Loop
548- -> Tid Scan on r3_
549- TID Cond: (ctid = '(1,1)'::tid)
550- Filter: (c1 = 1)
551- -> Seq Scan on t2 b2t2
552- Filter: (ctid = '(1,1)'::tid)
553- -> Tid Scan on t1 b2t1
554- TID Cond: (ctid = '(1,1)'::tid)
555- -> Tid Scan on t3 b2t3
556- TID Cond: (ctid = '(1,1)'::tid)
557- -> Tid Scan on t4 b2t4
558- TID Cond: (ctid = '(1,1)'::tid)
559-
560- Aggregate
561- -> Nested Loop
562- Join Filter: (b3t1.c1 = b3t4.c1)
563- -> Nested Loop
564- Join Filter: (b3t1.c1 = b3t3.c1)
565- -> Nested Loop
566- Join Filter: (b3t2.c1 = b3t1.c1)
567- -> Nested Loop
568- -> Tid Scan on r3_
569- TID Cond: (ctid = '(1,1)'::tid)
570- Filter: (c1 = 1)
571- -> Seq Scan on t2 b3t2
572- Filter: (ctid = '(1,1)'::tid)
573- -> Tid Scan on t1 b3t1
574- TID Cond: (ctid = '(1,1)'::tid)
575- -> Tid Scan on t3 b3t3
576- TID Cond: (ctid = '(1,1)'::tid)
577- -> Tid Scan on t4 b3t4
578- TID Cond: (ctid = '(1,1)'::tid)
579-(59 rows)
580-
581-/*+
582-Set(enable_tidscan off)Set(enable_nestloop off)
583-*/
584-EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';
585-LOG: pg_hint_plan:
586-used hint:
587-Set(enable_nestloop off)
588-Set(enable_tidscan off)
589-not used hint:
590-duplication hint:
591-error hint:
592-
593-LOG: pg_hint_plan:
594-used hint:
595-Set(enable_nestloop off)
596-Set(enable_tidscan off)
597-not used hint:
598-duplication hint:
599-error hint:
600-
601-LOG: pg_hint_plan:
602-used hint:
603-Set(enable_nestloop off)
604-Set(enable_tidscan off)
605-not used hint:
606-duplication hint:
607-error hint:
608-
609- QUERY PLAN
610----------------------------------------------------------------------
611- Aggregate
612- -> Nested Loop
613- -> Hash Join
614- Hash Cond: (b1t1.c1 = b1t4.c1)
615- -> Hash Join
616- Hash Cond: (b1t2.c1 = b1t1.c1)
617- -> Hash Join
618- Hash Cond: (b1t3.c1 = b1t2.c1)
619- -> Seq Scan on t3 b1t3
620- Filter: (ctid = '(1,1)'::tid)
621- -> Hash
622- -> Seq Scan on t2 b1t2
623- Filter: (ctid = '(1,1)'::tid)
624- -> Hash
625- -> Seq Scan on t1 b1t1
626- Filter: (ctid = '(1,1)'::tid)
627- -> Hash
628- -> Seq Scan on t4 b1t4
629- Filter: (ctid = '(1,1)'::tid)
630- -> Seq Scan on r3_
631- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
632-
633- Aggregate
634- -> Nested Loop
635- -> Hash Join
636- Hash Cond: (b2t1.c1 = b2t4.c1)
637- -> Hash Join
638- Hash Cond: (b2t2.c1 = b2t1.c1)
639- -> Hash Join
640- Hash Cond: (b2t3.c1 = b2t2.c1)
641- -> Seq Scan on t3 b2t3
642- Filter: (ctid = '(1,1)'::tid)
643- -> Hash
644- -> Seq Scan on t2 b2t2
645- Filter: (ctid = '(1,1)'::tid)
646- -> Hash
647- -> Seq Scan on t1 b2t1
648- Filter: (ctid = '(1,1)'::tid)
649- -> Hash
650- -> Seq Scan on t4 b2t4
651- Filter: (ctid = '(1,1)'::tid)
652- -> Seq Scan on r3_
653- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
654-
655- Aggregate
656- -> Nested Loop
657- -> Hash Join
658- Hash Cond: (b3t1.c1 = b3t4.c1)
659- -> Hash Join
660- Hash Cond: (b3t2.c1 = b3t1.c1)
661- -> Hash Join
662- Hash Cond: (b3t3.c1 = b3t2.c1)
663- -> Seq Scan on t3 b3t3
664- Filter: (ctid = '(1,1)'::tid)
665- -> Hash
666- -> Seq Scan on t2 b3t2
667- Filter: (ctid = '(1,1)'::tid)
668- -> Hash
669- -> Seq Scan on t1 b3t1
670- Filter: (ctid = '(1,1)'::tid)
671- -> Hash
672- -> Seq Scan on t4 b3t4
673- Filter: (ctid = '(1,1)'::tid)
674- -> Seq Scan on r3_
675- Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
676-(65 rows)
677-
678-RESET client_min_messages;
679-----
680----- No. G-2-1 GUC parameter
681-----
682--- No. G-2-1-3
683-/*+Set(1234567890123456789012345678901234567890123456789012345678901234 1)*/
684-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
685-NOTICE: identifier "1234567890123456789012345678901234567890123456789012345678901234" will be truncated to "123456789012345678901234567890123456789012345678901234567890123"
686-INFO: unrecognized configuration parameter "123456789012345678901234567890123456789012345678901234567890123"
687- c1 | c2 | c3 | c4
688-----+----+----+----
689- 1 | 1 | 1 | 1
690-(1 row)
691-
692--- No. G-2-1-4
693-/*+Set(constraint_exclusion 1234567890123456789012345678901234567890123456789012345678901234)*/
694-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
695-INFO: invalid value for parameter "constraint_exclusion": "1234567890123456789012345678901234567890123456789012345678901234"
696-HINT: Available values: partition, on, off.
697- c1 | c2 | c3 | c4
698-----+----+----+----
699- 1 | 1 | 1 | 1
700-(1 row)
701-
702-----
703----- No. G-2-2 category of GUC parameter and role
704-----
705--- No. G-2-2-1
706-SET ROLE super_user;
707-/*+Set(block_size 16384)*/
708-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
709-INFO: parameter "block_size" cannot be changed
710- c1 | c2 | c3 | c4
711-----+----+----+----
712- 1 | 1 | 1 | 1
713-(1 row)
714-
715--- No. G-2-2-2
716-/*+Set(archive_mode off)*/
717-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
718-INFO: parameter "archive_mode" cannot be changed without restarting the server
719- c1 | c2 | c3 | c4
720-----+----+----+----
721- 1 | 1 | 1 | 1
722-(1 row)
723-
724--- No. G-2-2-3
725-/*+Set(archive_timeout 0)*/
726-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
727-INFO: parameter "archive_timeout" cannot be changed now
728- c1 | c2 | c3 | c4
729-----+----+----+----
730- 1 | 1 | 1 | 1
731-(1 row)
732-
733--- No. G-2-2-4
734-/*+Set(log_connections off)*/
735-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
736-INFO: parameter "log_connections" cannot be set after connection start
737- c1 | c2 | c3 | c4
738-----+----+----+----
739- 1 | 1 | 1 | 1
740-(1 row)
741-
742--- No. G-2-2-5
743-/*+Set(log_min_messages WARNING)*/
744-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
745- c1 | c2 | c3 | c4
746-----+----+----+----
747- 1 | 1 | 1 | 1
748-(1 row)
749-
750-RESET ROLE;
751--- No. G-2-2-6
752-GRANT ALL ON SCHEMA s1 TO PUBLIC;
753-GRANT SELECT ON ALL TABLES IN SCHEMA s1 TO normal_user;
754-SET ROLE normal_user;
755-/*+Set(log_min_messages WARNING)*/
756-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
757-INFO: permission denied to set parameter "log_min_messages"
758- c1 | c2 | c3 | c4
759-----+----+----+----
760- 1 | 1 | 1 | 1
761-(1 row)
762-
763--- No. G-2-2-7
764-/*+Set(enable_seqscan on)*/
765-SELECT * FROM s1.t1 WHERE t1.c1 = 1;
766- c1 | c2 | c3 | c4
767-----+----+----+----
768- 1 | 1 | 1 | 1
769-(1 row)
770-
771-RESET ROLE;
772-REVOKE SELECT ON ALL TABLES IN SCHEMA s1 FROM normal_user;
773-REVOKE ALL ON SCHEMA s1 FROM PUBLIC;
774-----
775----- No. G-2-3 conflict set hint
776-----
777-SET client_min_messages TO LOG;
778--- No. G-2-3-1
779-/*+Set(enable_indexscan on)Set(enable_indexscan off)*/
780-SELECT * FROM s1.t1 WHERE false;
781-INFO: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan off)"
782-DETAIL: Conflict set hint.
783-LOG: pg_hint_plan:
784-used hint:
785-Set(enable_indexscan off)
786-not used hint:
787-duplication hint:
788-Set(enable_indexscan on)
789-error hint:
790-
791- c1 | c2 | c3 | c4
792-----+----+----+----
793-(0 rows)
794-
795--- No. G-2-3-2
796-/*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)*/
797-SELECT * FROM s1.t1 WHERE false;
798-INFO: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
799-DETAIL: Conflict set hint.
800-INFO: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
801-DETAIL: Conflict set hint.
802-LOG: pg_hint_plan:
803-used hint:
804-Set(client_min_messages DEBUG2)
805-not used hint:
806-duplication hint:
807-Set(client_min_messages DEBUG5)
808-Set(client_min_messages WARNING)
809-error hint:
810-
811- c1 | c2 | c3 | c4
812-----+----+----+----
813-(0 rows)
814-
815--- No. G-2-3-3
816-/*+Set(enable_indexscan on)Set(enable_indexscan o)*/
817-SELECT * FROM s1.t1 WHERE false;
818-INFO: hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan o)"
819-DETAIL: Conflict set hint.
820-INFO: parameter "enable_indexscan" requires a Boolean value
821-LOG: pg_hint_plan:
822-used hint:
823-not used hint:
824-duplication hint:
825-Set(enable_indexscan on)
826-error hint:
827-Set(enable_indexscan o)
828-
829- c1 | c2 | c3 | c4
830-----+----+----+----
831-(0 rows)
832-
833--- No. G-2-3-4
834-/*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)*/
835-SELECT * FROM s1.t1 WHERE false;
836-INFO: hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
837-DETAIL: Conflict set hint.
838-INFO: hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
839-DETAIL: Conflict set hint.
840-INFO: invalid value for parameter "client_min_messages": "DEBU"
841-HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error.
842-LOG: pg_hint_plan:
843-used hint:
844-not used hint:
845-duplication hint:
846-Set(client_min_messages DEBUG5)
847-Set(client_min_messages WARNING)
848-error hint:
849-Set(client_min_messages DEBU)
850-
851- c1 | c2 | c3 | c4
852-----+----+----+----
853-(0 rows)
854-
855-----
856----- No. G-2-4 debug message
857-----
858--- No. G-2-4-1
859-/*+SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) */
860-SELECT * FROM s1.t1 a, s1.t2 b WHERE false;
861-INFO: hint syntax error at or near " "
862-DETAIL: NestLoop hint requires at least two relations.
863-INFO: hint syntax error at or near "SeqScan(a)IndexScan(a)SeqScan(c)NestLoop(a) "
864-DETAIL: Conflict scan method hint.
865-LOG: pg_hint_plan:
866-used hint:
867-IndexScan(a)
868-not used hint:
869-SeqScan(c)
870-duplication hint:
871-SeqScan(a)
872-error hint:
873-NestLoop(a)
874-
875- c1 | c2 | c3 | c4 | c1 | c2 | c3 | c4
876-----+----+----+----+----+----+----+----
877-(0 rows)
878-
--- a/expected/ut-J-9.1.out
+++ /dev/null
@@ -1,4669 +0,0 @@
1-LOAD 'pg_hint_plan';
2-SET pg_hint_plan.enable_hint TO on;
3-SET pg_hint_plan.debug_print TO on;
4-SET client_min_messages TO LOG;
5-SET search_path TO public;
6-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
7- QUERY PLAN
8-------------------------------------
9- Merge Join
10- Merge Cond: (t1.c1 = t2.c1)
11- -> Index Scan using t1_i1 on t1
12- -> Sort
13- Sort Key: t2.c1
14- -> Seq Scan on t2
15-(6 rows)
16-
17-----
18----- No. J-1-1 specified pattern of the object name
19-----
20--- No. J-1-1-1
21-/*+HashJoin(t1 t2)*/
22-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
23-LOG: pg_hint_plan:
24-used hint:
25-HashJoin(t1 t2)
26-not used hint:
27-duplication hint:
28-error hint:
29-
30- QUERY PLAN
31-------------------------------
32- Hash Join
33- Hash Cond: (t1.c1 = t2.c1)
34- -> Seq Scan on t1
35- -> Hash
36- -> Seq Scan on t2
37-(5 rows)
38-
39--- No. J-1-1-2
40-/*+HashJoin(t1 t2)*/
41-EXPLAIN (COSTS false) SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1;
42-LOG: pg_hint_plan:
43-used hint:
44-not used hint:
45-HashJoin(t1 t2)
46-duplication hint:
47-error hint:
48-
49- QUERY PLAN
50-----------------------------------------
51- Merge Join
52- Merge Cond: (t_1.c1 = t_2.c1)
53- -> Index Scan using t1_i1 on t1 t_1
54- -> Sort
55- Sort Key: t_2.c1
56- -> Seq Scan on t2 t_2
57-(6 rows)
58-
59--- No. J-1-1-3
60-/*+HashJoin(t_1 t_2)*/
61-EXPLAIN (COSTS false) SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1;
62-LOG: pg_hint_plan:
63-used hint:
64-HashJoin(t_1 t_2)
65-not used hint:
66-duplication hint:
67-error hint:
68-
69- QUERY PLAN
70---------------------------------
71- Hash Join
72- Hash Cond: (t_1.c1 = t_2.c1)
73- -> Seq Scan on t1 t_1
74- -> Hash
75- -> Seq Scan on t2 t_2
76-(5 rows)
77-
78-----
79----- No. J-1-2 specified schema name in the hint option
80-----
81--- No. J-1-2-1
82-/*+HashJoin(t1 t2)*/
83-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
84-LOG: pg_hint_plan:
85-used hint:
86-HashJoin(t1 t2)
87-not used hint:
88-duplication hint:
89-error hint:
90-
91- QUERY PLAN
92-------------------------------
93- Hash Join
94- Hash Cond: (t1.c1 = t2.c1)
95- -> Seq Scan on t1
96- -> Hash
97- -> Seq Scan on t2
98-(5 rows)
99-
100--- No. J-1-2-2
101-/*+HashJoin(s1.t1 s1.t2)*/
102-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
103-LOG: pg_hint_plan:
104-used hint:
105-not used hint:
106-HashJoin(s1.t1 s1.t2)
107-duplication hint:
108-error hint:
109-
110- QUERY PLAN
111-------------------------------------
112- Merge Join
113- Merge Cond: (t1.c1 = t2.c1)
114- -> Index Scan using t1_i1 on t1
115- -> Sort
116- Sort Key: t2.c1
117- -> Seq Scan on t2
118-(6 rows)
119-
120-----
121----- No. J-1-3 table doesn't exist in the hint option
122-----
123--- No. J-1-3-1
124-/*+HashJoin(t1 t2)*/
125-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
126-LOG: pg_hint_plan:
127-used hint:
128-HashJoin(t1 t2)
129-not used hint:
130-duplication hint:
131-error hint:
132-
133- QUERY PLAN
134-------------------------------
135- Hash Join
136- Hash Cond: (t1.c1 = t2.c1)
137- -> Seq Scan on t1
138- -> Hash
139- -> Seq Scan on t2
140-(5 rows)
141-
142--- No. J-1-3-2
143-/*+HashJoin(t3 t4)*/
144-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
145-LOG: pg_hint_plan:
146-used hint:
147-not used hint:
148-HashJoin(t3 t4)
149-duplication hint:
150-error hint:
151-
152- QUERY PLAN
153-------------------------------------
154- Merge Join
155- Merge Cond: (t1.c1 = t2.c1)
156- -> Index Scan using t1_i1 on t1
157- -> Sort
158- Sort Key: t2.c1
159- -> Seq Scan on t2
160-(6 rows)
161-
162-----
163----- No. J-1-4 conflict table name
164-----
165--- No. J-1-4-1
166-/*+HashJoin(t1 t2)*/
167-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
168-LOG: pg_hint_plan:
169-used hint:
170-HashJoin(t1 t2)
171-not used hint:
172-duplication hint:
173-error hint:
174-
175- QUERY PLAN
176-------------------------------
177- Hash Join
178- Hash Cond: (t1.c1 = t2.c1)
179- -> Seq Scan on t1
180- -> Hash
181- -> Seq Scan on t2
182-(5 rows)
183-
184--- No. J-1-4-2
185-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
186- QUERY PLAN
187--------------------------------------
188- Merge Join
189- Merge Cond: (s1.t1.c1 = s2.t1.c1)
190- -> Index Scan using t1_i1 on t1
191- -> Sort
192- Sort Key: s2.t1.c1
193- -> Seq Scan on t1
194-(6 rows)
195-
196-/*+HashJoin(t1 t1)*/
197-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
198-INFO: hint syntax error at or near "HashJoin(t1 t1)"
199-DETAIL: Relation name "t1" is ambiguous.
200-LOG: pg_hint_plan:
201-used hint:
202-not used hint:
203-duplication hint:
204-error hint:
205-HashJoin(t1 t1)
206-
207- QUERY PLAN
208--------------------------------------
209- Merge Join
210- Merge Cond: (s1.t1.c1 = s2.t1.c1)
211- -> Index Scan using t1_i1 on t1
212- -> Sort
213- Sort Key: s2.t1.c1
214- -> Seq Scan on t1
215-(6 rows)
216-
217-/*+HashJoin(s1.t1 s2.t1)*/
218-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
219-LOG: pg_hint_plan:
220-used hint:
221-not used hint:
222-HashJoin(s1.t1 s2.t1)
223-duplication hint:
224-error hint:
225-
226- QUERY PLAN
227--------------------------------------
228- Merge Join
229- Merge Cond: (s1.t1.c1 = s2.t1.c1)
230- -> Index Scan using t1_i1 on t1
231- -> Sort
232- Sort Key: s2.t1.c1
233- -> Seq Scan on t1
234-(6 rows)
235-
236-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
237- QUERY PLAN
238-------------------------------------
239- Merge Join
240- Merge Cond: (t1.c1 = s2t1.c1)
241- -> Index Scan using t1_i1 on t1
242- -> Sort
243- Sort Key: s2t1.c1
244- -> Seq Scan on t1 s2t1
245-(6 rows)
246-
247-/*+HashJoin(t1 s2t1)*/
248-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
249-LOG: pg_hint_plan:
250-used hint:
251-HashJoin(s2t1 t1)
252-not used hint:
253-duplication hint:
254-error hint:
255-
256- QUERY PLAN
257----------------------------------
258- Hash Join
259- Hash Cond: (t1.c1 = s2t1.c1)
260- -> Seq Scan on t1
261- -> Hash
262- -> Seq Scan on t1 s2t1
263-(5 rows)
264-
265--- No. J-1-4-3
266-EXPLAIN (COSTS false) SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
267- QUERY PLAN
268----------------------------------------------------
269- Merge Join
270- Merge Cond: (s1.t1.c1 = s1.t2.c1)
271- InitPlan 1 (returns $0)
272- -> Aggregate
273- -> Merge Join
274- Merge Cond: (s1.t1.c1 = s1.t2.c1)
275- -> Index Scan using t1_i1 on t1
276- -> Sort
277- Sort Key: s1.t2.c1
278- -> Seq Scan on t2
279- -> Index Scan using t1_i1 on t1
280- -> Sort
281- Sort Key: s1.t2.c1
282- -> Seq Scan on t2
283-(14 rows)
284-
285-/*+HashJoin(t1 t2)*/
286-EXPLAIN (COSTS false) SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
287-LOG: pg_hint_plan:
288-used hint:
289-HashJoin(t1 t2)
290-not used hint:
291-duplication hint:
292-error hint:
293-
294- QUERY PLAN
295---------------------------------------------------
296- Hash Join
297- Hash Cond: (s1.t1.c1 = s1.t2.c1)
298- InitPlan 1 (returns $0)
299- -> Aggregate
300- -> Hash Join
301- Hash Cond: (s1.t1.c1 = s1.t2.c1)
302- -> Seq Scan on t1
303- -> Hash
304- -> Seq Scan on t2
305- -> Seq Scan on t1
306- -> Hash
307- -> Seq Scan on t2
308-(12 rows)
309-
310-/*+NestLoop(st1 st2)HashJoin(t1 t2)*/
311-EXPLAIN (COSTS false) SELECT *, (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
312-LOG: pg_hint_plan:
313-used hint:
314-NestLoop(st1 st2)
315-HashJoin(t1 t2)
316-not used hint:
317-duplication hint:
318-error hint:
319-
320- QUERY PLAN
321-------------------------------------------------------
322- Hash Join
323- Hash Cond: (t1.c1 = t2.c1)
324- InitPlan 1 (returns $1)
325- -> Aggregate
326- -> Nested Loop
327- -> Seq Scan on t2 st2
328- -> Index Scan using t1_i1 on t1 st1
329- Index Cond: (c1 = st2.c1)
330- -> Seq Scan on t1
331- -> Hash
332- -> Seq Scan on t2
333-(11 rows)
334-
335-----
336----- No. J-1-5 conflict table name
337-----
338--- No. J-1-5-1
339-/*+HashJoin(t1 t2)*/
340-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
341-LOG: pg_hint_plan:
342-used hint:
343-HashJoin(t1 t2)
344-not used hint:
345-duplication hint:
346-error hint:
347-
348- QUERY PLAN
349-------------------------------
350- Hash Join
351- Hash Cond: (t1.c1 = t2.c1)
352- -> Seq Scan on t1
353- -> Hash
354- -> Seq Scan on t2
355-(5 rows)
356-
357--- No. J-1-5-2
358-/*+HashJoin(t1 t1)*/
359-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
360-INFO: hint syntax error at or near "HashJoin(t1 t1)"
361-DETAIL: Relation name "t1" is duplicated.
362-LOG: pg_hint_plan:
363-used hint:
364-not used hint:
365-duplication hint:
366-error hint:
367-HashJoin(t1 t1)
368-
369- QUERY PLAN
370-------------------------------------
371- Merge Join
372- Merge Cond: (t1.c1 = t2.c1)
373- -> Index Scan using t1_i1 on t1
374- -> Sort
375- Sort Key: t2.c1
376- -> Seq Scan on t2
377-(6 rows)
378-
379--- No. J-1-5-3
380-/*+HashJoin(t1 t1)HashJoin(t2 t2)*/
381-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
382-INFO: hint syntax error at or near "HashJoin(t1 t1)HashJoin(t2 t2)"
383-DETAIL: Relation name "t1" is duplicated.
384-INFO: hint syntax error at or near "HashJoin(t2 t2)"
385-DETAIL: Relation name "t2" is duplicated.
386-LOG: pg_hint_plan:
387-used hint:
388-not used hint:
389-duplication hint:
390-error hint:
391-HashJoin(t1 t1)
392-HashJoin(t2 t2)
393-
394- QUERY PLAN
395-------------------------------------
396- Merge Join
397- Merge Cond: (t1.c1 = t2.c1)
398- -> Index Scan using t1_i1 on t1
399- -> Sort
400- Sort Key: t2.c1
401- -> Seq Scan on t2
402-(6 rows)
403-
404-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
405- QUERY PLAN
406-------------------------------------------
407- Merge Join
408- Merge Cond: (t1.c1 = t2.c1)
409- -> Merge Join
410- Merge Cond: (t1.c1 = t3.c1)
411- -> Index Scan using t1_i1 on t1
412- -> Index Scan using t3_i1 on t3
413- -> Sort
414- Sort Key: t2.c1
415- -> Seq Scan on t2
416-(9 rows)
417-
418-/*+HashJoin(t1 t2 t1 t2)*/
419-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
420-INFO: hint syntax error at or near "HashJoin(t1 t2 t1 t2)"
421-DETAIL: Relation name "t1" is duplicated.
422-LOG: pg_hint_plan:
423-used hint:
424-not used hint:
425-duplication hint:
426-error hint:
427-HashJoin(t1 t1 t2 t2)
428-
429- QUERY PLAN
430-------------------------------------------------
431- Merge Join
432- Merge Cond: (t1.c1 = t2.c1)
433- -> Merge Join
434- Merge Cond: (t1.c1 = t4.c1)
435- -> Merge Join
436- Merge Cond: (t1.c1 = t3.c1)
437- -> Index Scan using t1_i1 on t1
438- -> Index Scan using t3_i1 on t3
439- -> Index Scan using t4_i1 on t4
440- -> Sort
441- Sort Key: t2.c1
442- -> Seq Scan on t2
443-(12 rows)
444-
445-----
446----- No. J-1-6 object type for the hint
447-----
448--- No. J-1-6-1
449-/*+HashJoin(t1 t2)*/
450-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
451-LOG: pg_hint_plan:
452-used hint:
453-HashJoin(t1 t2)
454-not used hint:
455-duplication hint:
456-error hint:
457-
458- QUERY PLAN
459-------------------------------
460- Hash Join
461- Hash Cond: (t1.c1 = t2.c1)
462- -> Seq Scan on t1
463- -> Hash
464- -> Seq Scan on t2
465-(5 rows)
466-
467--- No. J-1-6-2
468-EXPLAIN (COSTS false) SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
469- QUERY PLAN
470----------------------------------------
471- Hash Join
472- Hash Cond: (t1.c1 = t2.c1)
473- -> Append
474- -> Seq Scan on p1 t1
475- -> Seq Scan on p1c1 t1
476- -> Seq Scan on p1c2 t1
477- -> Seq Scan on p1c3 t1
478- -> Hash
479- -> Append
480- -> Seq Scan on p1 t2
481- -> Seq Scan on p1c1 t2
482- -> Seq Scan on p1c2 t2
483- -> Seq Scan on p1c3 t2
484-(13 rows)
485-
486-/*+NestLoop(t1 t2)*/
487-EXPLAIN (COSTS false) SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
488-LOG: pg_hint_plan:
489-used hint:
490-NestLoop(t1 t2)
491-not used hint:
492-duplication hint:
493-error hint:
494-
495- QUERY PLAN
496------------------------------------------------------------
497- Nested Loop
498- Join Filter: (t1.c1 = t2.c1)
499- -> Append
500- -> Seq Scan on p1 t1
501- -> Seq Scan on p1c1 t1
502- -> Seq Scan on p1c2 t1
503- -> Seq Scan on p1c3 t1
504- -> Append
505- -> Index Scan using p1_i on p1 t2
506- Index Cond: ((c1 = t1.c1) AND (c1 = t1.c1))
507- -> Index Scan using p1c1_i on p1c1 t2
508- Index Cond: ((c1 = t1.c1) AND (c1 = t1.c1))
509- -> Index Scan using p1c2_i on p1c2 t2
510- Index Cond: ((c1 = t1.c1) AND (c1 = t1.c1))
511- -> Index Scan using p1c3_i on p1c3 t2
512- Index Cond: ((c1 = t1.c1) AND (c1 = t1.c1))
513-(16 rows)
514-
515--- No. J-1-6-3
516-EXPLAIN (COSTS false) SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
517- QUERY PLAN
518---------------------------------
519- Hash Join
520- Hash Cond: (t1.c1 = t2.c1)
521- -> Seq Scan on ul1 t1
522- -> Hash
523- -> Seq Scan on ul1 t2
524-(5 rows)
525-
526-/*+NestLoop(t1 t2)*/
527-EXPLAIN (COSTS false) SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
528-LOG: pg_hint_plan:
529-used hint:
530-NestLoop(t1 t2)
531-not used hint:
532-duplication hint:
533-error hint:
534-
535- QUERY PLAN
536--------------------------------------------
537- Nested Loop
538- -> Seq Scan on ul1 t1
539- -> Index Scan using ul1_pkey on ul1 t2
540- Index Cond: (c1 = t1.c1)
541-(4 rows)
542-
543--- No. J-1-6-4
544-CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL);
545-NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tm1_pkey" for table "tm1"
546-EXPLAIN (COSTS false) SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
547- QUERY PLAN
548---------------------------------
549- Hash Join
550- Hash Cond: (t1.c1 = t2.c1)
551- -> Seq Scan on tm1 t1
552- -> Hash
553- -> Seq Scan on tm1 t2
554-(5 rows)
555-
556-/*+NestLoop(t1 t2)*/
557-EXPLAIN (COSTS false) SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
558-LOG: pg_hint_plan:
559-used hint:
560-NestLoop(t1 t2)
561-not used hint:
562-duplication hint:
563-error hint:
564-
565- QUERY PLAN
566--------------------------------------------
567- Nested Loop
568- -> Seq Scan on tm1 t1
569- -> Index Scan using tm1_pkey on tm1 t2
570- Index Cond: (c1 = t1.c1)
571-(4 rows)
572-
573--- No. J-1-6-5
574-EXPLAIN (COSTS false) SELECT * FROM pg_catalog.pg_class t1, pg_catalog.pg_class t2 WHERE t1.oid = t2.oid;
575- QUERY PLAN
576--------------------------------------
577- Hash Join
578- Hash Cond: (t1.oid = t2.oid)
579- -> Seq Scan on pg_class t1
580- -> Hash
581- -> Seq Scan on pg_class t2
582-(5 rows)
583-
584-/*+NestLoop(t1 t2)*/
585-EXPLAIN (COSTS false) SELECT * FROM pg_catalog.pg_class t1, pg_catalog.pg_class t2 WHERE t1.oid = t2.oid;
586-LOG: pg_hint_plan:
587-used hint:
588-NestLoop(t1 t2)
589-not used hint:
590-duplication hint:
591-error hint:
592-
593- QUERY PLAN
594-----------------------------------------------------------
595- Nested Loop
596- -> Seq Scan on pg_class t1
597- -> Index Scan using pg_class_oid_index on pg_class t2
598- Index Cond: (oid = t1.oid)
599-(4 rows)
600-
601--- No. J-1-6-6
602--- refer ut-fdw.sql
603--- No. J-1-6-7
604-EXPLAIN (COSTS false) SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
605- QUERY PLAN
606---------------------------------
607- Nested Loop
608- Join Filter: (t1.c1 = t2.c1)
609- -> Function Scan on f1 t1
610- -> Function Scan on f1 t2
611-(4 rows)
612-
613-/*+HashJoin(t1 t2)*/
614-EXPLAIN (COSTS false) SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
615-LOG: pg_hint_plan:
616-used hint:
617-HashJoin(t1 t2)
618-not used hint:
619-duplication hint:
620-error hint:
621-
622- QUERY PLAN
623-------------------------------------
624- Hash Join
625- Hash Cond: (t1.c1 = t2.c1)
626- -> Function Scan on f1 t1
627- -> Hash
628- -> Function Scan on f1 t2
629-(5 rows)
630-
631--- No. J-1-6-8
632-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
633- QUERY PLAN
634--------------------------------------------
635- Hash Join
636- Hash Cond: (t2.c1 = "*VALUES*".column1)
637- -> Seq Scan on t2
638- -> Hash
639- -> Values Scan on "*VALUES*"
640-(5 rows)
641-
642-/*+NestLoop(t1 t2)*/
643-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
644-LOG: pg_hint_plan:
645-used hint:
646-not used hint:
647-NestLoop(t1 t2)
648-duplication hint:
649-error hint:
650-
651- QUERY PLAN
652--------------------------------------------
653- Hash Join
654- Hash Cond: (t2.c1 = "*VALUES*".column1)
655- -> Seq Scan on t2
656- -> Hash
657- -> Values Scan on "*VALUES*"
658-(5 rows)
659-
660-/*+NestLoop(*VALUES* t2)*/
661-EXPLAIN (COSTS false) SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
662-LOG: pg_hint_plan:
663-used hint:
664-NestLoop(*VALUES* t2)
665-not used hint:
666-duplication hint:
667-error hint:
668-
669- QUERY PLAN
670----------------------------------------------
671- Nested Loop
672- Join Filter: ("*VALUES*".column1 = t2.c1)
673- -> Seq Scan on t2
674- -> Materialize
675- -> Values Scan on "*VALUES*"
676-(5 rows)
677-
678--- No. J-1-6-9
679-EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1;
680- QUERY PLAN
681---------------------------------------------------
682- Nested Loop
683- CTE c1
684- -> Aggregate
685- -> Merge Join
686- Merge Cond: (s1.t1.c1 = t2.c1)
687- -> Index Scan using t1_i1 on t1
688- -> Sort
689- Sort Key: t2.c1
690- -> Seq Scan on t2
691- -> CTE Scan on c1
692- -> Index Scan using t1_i1 on t1
693- Index Cond: (c1 = c1.c1)
694-(12 rows)
695-
696-/*+NestLoop(t1 t2)HashJoin(t1 c1)*/
697-EXPLAIN (COSTS false) WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1;
698-LOG: pg_hint_plan:
699-used hint:
700-HashJoin(c1 t1)
701-NestLoop(t1 t2)
702-not used hint:
703-duplication hint:
704-error hint:
705-
706- QUERY PLAN
707---------------------------------------------------
708- Hash Join
709- Hash Cond: (s1.t1.c1 = c1.c1)
710- CTE c1
711- -> Aggregate
712- -> Nested Loop
713- -> Seq Scan on t2
714- -> Index Scan using t1_i1 on t1
715- Index Cond: (c1 = t2.c1)
716- -> Seq Scan on t1
717- -> Hash
718- -> CTE Scan on c1
719-(11 rows)
720-
721--- No. J-1-6-10
722-EXPLAIN (COSTS false) SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
723- QUERY PLAN
724-----------------------------------
725- Hash Join
726- Hash Cond: (v1t1.c1 = v1t1.c1)
727- -> Seq Scan on t1 v1t1
728- -> Hash
729- -> Seq Scan on t1 v1t1
730-(5 rows)
731-
732-/*+NestLoop(t1 t2)*/
733-EXPLAIN (COSTS false) SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
734-LOG: pg_hint_plan:
735-used hint:
736-not used hint:
737-NestLoop(t1 t2)
738-duplication hint:
739-error hint:
740-
741- QUERY PLAN
742-----------------------------------
743- Hash Join
744- Hash Cond: (v1t1.c1 = v1t1.c1)
745- -> Seq Scan on t1 v1t1
746- -> Hash
747- -> Seq Scan on t1 v1t1
748-(5 rows)
749-
750-/*+NestLoop(v1t1 v1t1_)*/
751-EXPLAIN (COSTS false) SELECT * FROM s1.v1 t1, s1.v1_ t2 WHERE t1.c1 = t2.c1;
752-LOG: pg_hint_plan:
753-used hint:
754-NestLoop(v1t1 v1t1_)
755-not used hint:
756-duplication hint:
757-error hint:
758-
759- QUERY PLAN
760-------------------------------------------
761- Nested Loop
762- -> Seq Scan on t1 v1t1
763- -> Index Scan using t1_i1 on t1 v1t1_
764- Index Cond: (c1 = v1t1.c1)
765-(4 rows)
766-
767--- No. J-1-6-11
768-EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1);
769- QUERY PLAN
770-------------------------------------------------------
771- Nested Loop
772- InitPlan 1 (returns $0)
773- -> Aggregate
774- -> Merge Join
775- Merge Cond: (st1.c1 = st2.c1)
776- -> Index Scan using t1_i1 on t1 st1
777- -> Sort
778- Sort Key: st2.c1
779- -> Seq Scan on t2 st2
780- -> Index Scan using t1_i1 on t1
781- Index Cond: (c1 = $0)
782- -> Seq Scan on t2
783- Filter: (c1 = $0)
784-(13 rows)
785-
786-/*+MergeJoin(t1 t2)NestLoop(st1 st2)*/
787-EXPLAIN (COSTS true) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1);
788-LOG: pg_hint_plan:
789-used hint:
790-NestLoop(st1 st2)
791-MergeJoin(t1 t2)
792-not used hint:
793-duplication hint:
794-error hint:
795-
796- QUERY PLAN
797-----------------------------------------------------------------------------------------
798- Nested Loop (cost=10000000074.28..10000000084.81 rows=1 width=29)
799- InitPlan 1 (returns $1)
800- -> Aggregate (cost=74.27..74.28 rows=1 width=4)
801- -> Nested Loop (cost=0.00..74.02 rows=100 width=4)
802- -> Seq Scan on t2 st2 (cost=0.00..2.00 rows=100 width=4)
803- -> Index Scan using t1_i1 on t1 st1 (cost=0.00..0.71 rows=1 width=4)
804- Index Cond: (c1 = st2.c1)
805- -> Index Scan using t1_i1 on t1 (cost=0.00..8.27 rows=1 width=15)
806- Index Cond: (c1 = $1)
807- -> Seq Scan on t2 (cost=0.00..2.25 rows=1 width=14)
808- Filter: (c1 = $1)
809-(11 rows)
810-
811-EXPLAIN (COSTS false) SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
812- QUERY PLAN
813-------------------------------------
814- Merge Join
815- Merge Cond: (t1.c1 = t2.c1)
816- -> Index Scan using t1_i1 on t1
817- -> Sort
818- Sort Key: t2.c1
819- -> Seq Scan on t2
820-(6 rows)
821-
822-/*+HashJoin(t1 st2)*/
823-EXPLAIN (COSTS false) SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
824-LOG: pg_hint_plan:
825-used hint:
826-not used hint:
827-HashJoin(st2 t1)
828-duplication hint:
829-error hint:
830-
831- QUERY PLAN
832-------------------------------------
833- Merge Join
834- Merge Cond: (t1.c1 = t2.c1)
835- -> Index Scan using t1_i1 on t1
836- -> Sort
837- Sort Key: t2.c1
838- -> Seq Scan on t2
839-(6 rows)
840-
841-/*+HashJoin(t1 t2)*/
842-EXPLAIN (COSTS false) SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
843-LOG: pg_hint_plan:
844-used hint:
845-HashJoin(t1 t2)
846-not used hint:
847-duplication hint:
848-error hint:
849-
850- QUERY PLAN
851-------------------------------
852- Hash Join
853- Hash Cond: (t1.c1 = t2.c1)
854- -> Seq Scan on t1
855- -> Hash
856- -> Seq Scan on t2
857-(5 rows)
858-
859-----
860----- No. J-2-1 some complexity query blocks
861-----
862--- No. J-2-1-1
863-EXPLAIN (COSTS false)
864-SELECT max(bmt1.c1), (
865-SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.ctid = '(1,1)' AND b1t1.c1 = b1t2.c1 AND b1t2.ctid = '(1,1)' AND b1t1.c1 = b1t3.c1 AND b1t3.ctid = '(1,1)' AND b1t1.c1 = b1t4.c1 AND b1t4.ctid = '(1,1)'
866-), (
867-SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.ctid = '(1,1)' AND b2t1.c1 = b2t2.c1 AND b2t2.ctid = '(1,1)' AND b2t1.c1 = b2t3.c1 AND b2t3.ctid = '(1,1)' AND b2t1.c1 = b2t4.c1 AND b2t4.ctid = '(1,1)'
868-)
869- FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
870-;
871- QUERY PLAN
872--------------------------------------------------------------------
873- Aggregate
874- InitPlan 1 (returns $0)
875- -> Aggregate
876- -> Nested Loop
877- Join Filter: (b1t1.c1 = b1t4.c1)
878- -> Nested Loop
879- Join Filter: (b1t1.c1 = b1t3.c1)
880- -> Nested Loop
881- Join Filter: (b1t1.c1 = b1t2.c1)
882- -> Tid Scan on t1 b1t1
883- TID Cond: (ctid = '(1,1)'::tid)
884- -> Seq Scan on t2 b1t2
885- Filter: (ctid = '(1,1)'::tid)
886- -> Tid Scan on t3 b1t3
887- TID Cond: (ctid = '(1,1)'::tid)
888- -> Tid Scan on t4 b1t4
889- TID Cond: (ctid = '(1,1)'::tid)
890- InitPlan 2 (returns $1)
891- -> Aggregate
892- -> Nested Loop
893- Join Filter: (b2t1.c1 = b2t4.c1)
894- -> Nested Loop
895- Join Filter: (b2t1.c1 = b2t3.c1)
896- -> Nested Loop
897- Join Filter: (b2t1.c1 = b2t2.c1)
898- -> Tid Scan on t1 b2t1
899- TID Cond: (ctid = '(1,1)'::tid)
900- -> Seq Scan on t2 b2t2
901- Filter: (ctid = '(1,1)'::tid)
902- -> Tid Scan on t3 b2t3
903- TID Cond: (ctid = '(1,1)'::tid)
904- -> Tid Scan on t4 b2t4
905- TID Cond: (ctid = '(1,1)'::tid)
906- -> Nested Loop
907- Join Filter: (bmt1.c1 = bmt4.c1)
908- -> Nested Loop
909- Join Filter: (bmt1.c1 = bmt3.c1)
910- -> Nested Loop
911- Join Filter: (bmt1.c1 = bmt2.c1)
912- -> Tid Scan on t1 bmt1
913- TID Cond: (ctid = '(1,1)'::tid)
914- -> Seq Scan on t2 bmt2
915- Filter: (ctid = '(1,1)'::tid)
916- -> Tid Scan on t3 bmt3
917- TID Cond: (ctid = '(1,1)'::tid)
918- -> Tid Scan on t4 bmt4
919- TID Cond: (ctid = '(1,1)'::tid)
920-(47 rows)
921-
922-/*+
923-Leading(bmt1 bmt2 bmt3 bmt4)
924-Leading(b1t2 b1t3 b1t4 b1t1)
925-Leading(b2t3 b2t4 b2t1 b2t2)
926-MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
927-MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
928-MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
929-*/
930-EXPLAIN (COSTS false)
931-SELECT max(bmt1.c1), (
932-SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.ctid = '(1,1)' AND b1t1.c1 = b1t2.c1 AND b1t2.ctid = '(1,1)' AND b1t1.c1 = b1t3.c1 AND b1t3.ctid = '(1,1)' AND b1t1.c1 = b1t4.c1 AND b1t4.ctid = '(1,1)'
933-), (
934-SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.ctid = '(1,1)' AND b2t1.c1 = b2t2.c1 AND b2t2.ctid = '(1,1)' AND b2t1.c1 = b2t3.c1 AND b2t3.ctid = '(1,1)' AND b2t1.c1 = b2t4.c1 AND b2t4.ctid = '(1,1)'
935-)
936- FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
937-;
938-LOG: pg_hint_plan:
939-used hint:
940-MergeJoin(b1t2 b1t3)
941-MergeJoin(b2t3 b2t4)
942-MergeJoin(bmt1 bmt2)
943-HashJoin(b1t2 b1t3 b1t4)
944-HashJoin(b2t1 b2t3 b2t4)
945-HashJoin(bmt1 bmt2 bmt3)
946-NestLoop(b1t1 b1t2 b1t3 b1t4)
947-NestLoop(b2t1 b2t2 b2t3 b2t4)
948-NestLoop(bmt1 bmt2 bmt3 bmt4)
949-Leading(bmt1 bmt2 bmt3 bmt4)
950-Leading(b1t2 b1t3 b1t4 b1t1)
951-Leading(b2t3 b2t4 b2t1 b2t2)
952-not used hint:
953-duplication hint:
954-error hint:
955-
956- QUERY PLAN
957--------------------------------------------------------------------------------
958- Aggregate
959- InitPlan 1 (returns $0)
960- -> Aggregate
961- -> Nested Loop
962- Join Filter: (b1t2.c1 = b1t1.c1)
963- -> Hash Join
964- Hash Cond: (b1t4.c1 = b1t2.c1)
965- -> Tid Scan on t4 b1t4
966- TID Cond: (ctid = '(1,1)'::tid)
967- -> Hash
968- -> Merge Join
969- Merge Cond: (b1t2.c1 = b1t3.c1)
970- -> Sort
971- Sort Key: b1t2.c1
972- -> Seq Scan on t2 b1t2
973- Filter: (ctid = '(1,1)'::tid)
974- -> Sort
975- Sort Key: b1t3.c1
976- -> Tid Scan on t3 b1t3
977- TID Cond: (ctid = '(1,1)'::tid)
978- -> Tid Scan on t1 b1t1
979- TID Cond: (ctid = '(1,1)'::tid)
980- InitPlan 2 (returns $1)
981- -> Aggregate
982- -> Nested Loop
983- Join Filter: (b2t1.c1 = b2t2.c1)
984- -> Hash Join
985- Hash Cond: (b2t1.c1 = b2t3.c1)
986- -> Tid Scan on t1 b2t1
987- TID Cond: (ctid = '(1,1)'::tid)
988- -> Hash
989- -> Merge Join
990- Merge Cond: (b2t3.c1 = b2t4.c1)
991- -> Sort
992- Sort Key: b2t3.c1
993- -> Tid Scan on t3 b2t3
994- TID Cond: (ctid = '(1,1)'::tid)
995- -> Sort
996- Sort Key: b2t4.c1
997- -> Tid Scan on t4 b2t4
998- TID Cond: (ctid = '(1,1)'::tid)
999- -> Seq Scan on t2 b2t2
1000- Filter: (ctid = '(1,1)'::tid)
1001- -> Nested Loop
1002- Join Filter: (bmt1.c1 = bmt4.c1)
1003- -> Hash Join
1004- Hash Cond: (bmt3.c1 = bmt1.c1)
1005- -> Tid Scan on t3 bmt3
1006- TID Cond: (ctid = '(1,1)'::tid)
1007- -> Hash
1008- -> Merge Join
1009- Merge Cond: (bmt1.c1 = bmt2.c1)
1010- -> Sort
1011- Sort Key: bmt1.c1
1012- -> Tid Scan on t1 bmt1
1013- TID Cond: (ctid = '(1,1)'::tid)
1014- -> Sort
1015- Sort Key: bmt2.c1
1016- -> Seq Scan on t2 bmt2
1017- Filter: (ctid = '(1,1)'::tid)
1018- -> Tid Scan on t4 bmt4
1019- TID Cond: (ctid = '(1,1)'::tid)
1020-(62 rows)
1021-
1022--- No. J-2-1-2
1023-EXPLAIN (COSTS false)
1024-SELECT max(bmt1.c1), (
1025-SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.ctid = '(1,1)' AND b1t1.c1 = b1t2.c1 AND b1t2.ctid = '(1,1)' AND b1t1.c1 = b1t3.c1 AND b1t3.ctid = '(1,1)' AND b1t1.c1 = b1t4.c1 AND b1t4.ctid = '(1,1)'
1026-), (
1027-SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.ctid = '(1,1)' AND b2t1.c1 = b2t2.c1 AND b2t2.ctid = '(1,1)' AND b2t1.c1 = b2t3.c1 AND b2t3.ctid = '(1,1)' AND b2t1.c1 = b2t4.c1 AND b2t4.ctid = '(1,1)'
1028-), (
1029-SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.ctid = '(1,1)' AND b3t1.c1 = b3t2.c1 AND b3t2.ctid = '(1,1)' AND b3t1.c1 = b3t3.c1 AND b3t3.ctid = '(1,1)' AND b3t1.c1 = b3t4.c1 AND b3t4.ctid = '(1,1)'
1030-)
1031- FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
1032-;
1033- QUERY PLAN
1034--------------------------------------------------------------------
1035- Aggregate
1036- InitPlan 1 (returns $0)
1037- -> Aggregate
1038- -> Nested Loop
1039- Join Filter: (b1t1.c1 = b1t4.c1)
1040- -> Nested Loop
1041- Join Filter: (b1t1.c1 = b1t3.c1)
1042- -> Nested Loop
1043- Join Filter: (b1t1.c1 = b1t2.c1)
1044- -> Tid Scan on t1 b1t1
1045- TID Cond: (ctid = '(1,1)'::tid)
1046- -> Seq Scan on t2 b1t2
1047- Filter: (ctid = '(1,1)'::tid)
1048- -> Tid Scan on t3 b1t3
1049- TID Cond: (ctid = '(1,1)'::tid)
1050- -> Tid Scan on t4 b1t4
1051- TID Cond: (ctid = '(1,1)'::tid)
1052- InitPlan 2 (returns $1)
1053- -> Aggregate
1054- -> Nested Loop
1055- Join Filter: (b2t1.c1 = b2t4.c1)
1056- -> Nested Loop
1057- Join Filter: (b2t1.c1 = b2t3.c1)
1058- -> Nested Loop
1059- Join Filter: (b2t1.c1 = b2t2.c1)
1060- -> Tid Scan on t1 b2t1
1061- TID Cond: (ctid = '(1,1)'::tid)
1062- -> Seq Scan on t2 b2t2
1063- Filter: (ctid = '(1,1)'::tid)
1064- -> Tid Scan on t3 b2t3
1065- TID Cond: (ctid = '(1,1)'::tid)
1066- -> Tid Scan on t4 b2t4
1067- TID Cond: (ctid = '(1,1)'::tid)
1068- InitPlan 3 (returns $2)
1069- -> Aggregate
1070- -> Nested Loop
1071- Join Filter: (b3t1.c1 = b3t4.c1)
1072- -> Nested Loop
1073- Join Filter: (b3t1.c1 = b3t3.c1)
1074- -> Nested Loop
1075- Join Filter: (b3t1.c1 = b3t2.c1)
1076- -> Tid Scan on t1 b3t1
1077- TID Cond: (ctid = '(1,1)'::tid)
1078- -> Seq Scan on t2 b3t2
1079- Filter: (ctid = '(1,1)'::tid)
1080- -> Tid Scan on t3 b3t3
1081- TID Cond: (ctid = '(1,1)'::tid)
1082- -> Tid Scan on t4 b3t4
1083- TID Cond: (ctid = '(1,1)'::tid)
1084- -> Nested Loop
1085- Join Filter: (bmt1.c1 = bmt4.c1)
1086- -> Nested Loop
1087- Join Filter: (bmt1.c1 = bmt3.c1)
1088- -> Nested Loop
1089- Join Filter: (bmt1.c1 = bmt2.c1)
1090- -> Tid Scan on t1 bmt1
1091- TID Cond: (ctid = '(1,1)'::tid)
1092- -> Seq Scan on t2 bmt2
1093- Filter: (ctid = '(1,1)'::tid)
1094- -> Tid Scan on t3 bmt3
1095- TID Cond: (ctid = '(1,1)'::tid)
1096- -> Tid Scan on t4 bmt4
1097- TID Cond: (ctid = '(1,1)'::tid)
1098-(63 rows)
1099-
1100-/*+
1101-Leading(bmt1 bmt2 bmt3 bmt4)
1102-Leading(b1t2 b1t3 b1t4 b1t1)
1103-Leading(b2t3 b2t4 b2t1 b2t2)
1104-Leading(b3t4 b3t1 b3t2 b3t3)
1105-MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1106-MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1107-MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1108-MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1109-*/
1110-EXPLAIN (COSTS false)
1111-SELECT max(bmt1.c1), (
1112-SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.ctid = '(1,1)' AND b1t1.c1 = b1t2.c1 AND b1t2.ctid = '(1,1)' AND b1t1.c1 = b1t3.c1 AND b1t3.ctid = '(1,1)' AND b1t1.c1 = b1t4.c1 AND b1t4.ctid = '(1,1)'
1113-), (
1114-SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.ctid = '(1,1)' AND b2t1.c1 = b2t2.c1 AND b2t2.ctid = '(1,1)' AND b2t1.c1 = b2t3.c1 AND b2t3.ctid = '(1,1)' AND b2t1.c1 = b2t4.c1 AND b2t4.ctid = '(1,1)'
1115-), (
1116-SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.ctid = '(1,1)' AND b3t1.c1 = b3t2.c1 AND b3t2.ctid = '(1,1)' AND b3t1.c1 = b3t3.c1 AND b3t3.ctid = '(1,1)' AND b3t1.c1 = b3t4.c1 AND b3t4.ctid = '(1,1)'
1117-)
1118- FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.ctid = '(1,1)' AND bmt1.c1 = bmt2.c1 AND bmt2.ctid = '(1,1)' AND bmt1.c1 = bmt3.c1 AND bmt3.ctid = '(1,1)' AND bmt1.c1 = bmt4.c1 AND bmt4.ctid = '(1,1)'
1119-;
1120-LOG: pg_hint_plan:
1121-used hint:
1122-MergeJoin(b1t2 b1t3)
1123-MergeJoin(b2t3 b2t4)
1124-MergeJoin(b3t1 b3t4)
1125-MergeJoin(bmt1 bmt2)
1126-HashJoin(b1t2 b1t3 b1t4)
1127-HashJoin(b2t1 b2t3 b2t4)
1128-HashJoin(b3t1 b3t2 b3t4)
1129-HashJoin(bmt1 bmt2 bmt3)
1130-NestLoop(b1t1 b1t2 b1t3 b1t4)
1131-NestLoop(b2t1 b2t2 b2t3 b2t4)
1132-NestLoop(b3t1 b3t2 b3t3 b3t4)
1133-NestLoop(bmt1 bmt2 bmt3 bmt4)
1134-Leading(bmt1 bmt2 bmt3 bmt4)
1135-Leading(b1t2 b1t3 b1t4 b1t1)
1136-Leading(b2t3 b2t4 b2t1 b2t2)
1137-Leading(b3t4 b3t1 b3t2 b3t3)
1138-not used hint:
1139-duplication hint:
1140-error hint:
1141-
1142- QUERY PLAN
1143--------------------------------------------------------------------------------
1144- Aggregate
1145- InitPlan 1 (returns $0)
1146- -> Aggregate
1147- -> Nested Loop
1148- Join Filter: (b1t2.c1 = b1t1.c1)
1149- -> Hash Join
1150- Hash Cond: (b1t4.c1 = b1t2.c1)
1151- -> Tid Scan on t4 b1t4
1152- TID Cond: (ctid = '(1,1)'::tid)
1153- -> Hash
1154- -> Merge Join
1155- Merge Cond: (b1t2.c1 = b1t3.c1)
1156- -> Sort
1157- Sort Key: b1t2.c1
1158- -> Seq Scan on t2 b1t2
1159- Filter: (ctid = '(1,1)'::tid)
1160- -> Sort
1161- Sort Key: b1t3.c1
1162- -> Tid Scan on t3 b1t3
1163- TID Cond: (ctid = '(1,1)'::tid)
1164- -> Tid Scan on t1 b1t1
1165- TID Cond: (ctid = '(1,1)'::tid)
1166- InitPlan 2 (returns $1)
1167- -> Aggregate
1168- -> Nested Loop
1169- Join Filter: (b2t1.c1 = b2t2.c1)
1170- -> Hash Join
1171- Hash Cond: (b2t1.c1 = b2t3.c1)
1172- -> Tid Scan on t1 b2t1
1173- TID Cond: (ctid = '(1,1)'::tid)
1174- -> Hash
1175- -> Merge Join
1176- Merge Cond: (b2t3.c1 = b2t4.c1)
1177- -> Sort
1178- Sort Key: b2t3.c1
1179- -> Tid Scan on t3 b2t3
1180- TID Cond: (ctid = '(1,1)'::tid)
1181- -> Sort
1182- Sort Key: b2t4.c1
1183- -> Tid Scan on t4 b2t4
1184- TID Cond: (ctid = '(1,1)'::tid)
1185- -> Seq Scan on t2 b2t2
1186- Filter: (ctid = '(1,1)'::tid)
1187- InitPlan 3 (returns $2)
1188- -> Aggregate
1189- -> Nested Loop
1190- Join Filter: (b3t1.c1 = b3t3.c1)
1191- -> Hash Join
1192- Hash Cond: (b3t2.c1 = b3t1.c1)
1193- -> Seq Scan on t2 b3t2
1194- Filter: (ctid = '(1,1)'::tid)
1195- -> Hash
1196- -> Merge Join
1197- Merge Cond: (b3t1.c1 = b3t4.c1)
1198- -> Sort
1199- Sort Key: b3t1.c1
1200- -> Tid Scan on t1 b3t1
1201- TID Cond: (ctid = '(1,1)'::tid)
1202- -> Sort
1203- Sort Key: b3t4.c1
1204- -> Tid Scan on t4 b3t4
1205- TID Cond: (ctid = '(1,1)'::tid)
1206- -> Tid Scan on t3 b3t3
1207- TID Cond: (ctid = '(1,1)'::tid)
1208- -> Nested Loop
1209- Join Filter: (bmt1.c1 = bmt4.c1)
1210- -> Hash Join
1211- Hash Cond: (bmt3.c1 = bmt1.c1)
1212- -> Tid Scan on t3 bmt3
1213- TID Cond: (ctid = '(1,1)'::tid)
1214- -> Hash
1215-

Part of diff was cut off due to size limit. Use your local client to view the full diff.