Skip to content

Commit a85f236

Browse files
committed
[Doc]: Apply patch to pghintplan.sgml
1 parent 0b96d4d commit a85f236

File tree

1 file changed

+211
-112
lines changed

1 file changed

+211
-112
lines changed

doc/src/sgml/pghintplan.sgml

Lines changed: 211 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -134,48 +134,52 @@ postgres=#
134134
<sect3 id="pg-hint-plan-hint-GUC">
135135
<title>GUC parameters for pg_hint_plan</title>
136136
<para>
137-
GUC parameters below affect the behavior of
137+
GUC parameters described below affect the behavior of
138138
pg_hint_plan.
139139
</para>
140-
<para>
141-
Parameter name
142-
</para>
143-
<para>
144-
Description
145-
</para>
146-
<para>
147-
Default value
148-
</para>
149-
<para>
150-
pg_hint_plan.enable_hint
151-
</para>
152-
<para>
153-
Enables or disables the function of pg_hint_plan.
154-
</para>
155-
<para>
156-
on
157-
</para>
158-
<para>
159-
pg_hint_plan.debug_print
160-
</para>
161-
<para>
162-
Enables and select the verbosity of the debug output of
163-
pg_hint_plan. off, on, detailed and verbose are valid.
164-
</para>
165-
<para>
166-
off
167-
</para>
168-
<para>
169-
pg_hint_plan.message_level
170-
</para>
171-
<para>
172-
Specifies the message level of debug prints. error, warning,
173-
notice, info, log, debug are valid and fatal and panic are
174-
inhibited.
175-
</para>
176-
<para>
177-
info
178-
</para>
140+
141+
<table id="pg-hint-plan-hint-GUC-table">
142+
<title>GUC Parameters</title>
143+
<tgroup cols="3">
144+
<thead>
145+
<row>
146+
<entry>Parameter Name</entry>
147+
<entry>Description</entry>
148+
<entry>Default Value</entry>
149+
</row>
150+
</thead>
151+
152+
<tbody>
153+
<row>
154+
<entry>pg_hint_plan.enable_hint</entry>
155+
<entry>Enables or disables the function of pg_hint_plan.</entry>
156+
<entry>on</entry>
157+
</row>
158+
159+
<row>
160+
<entry>pg_hint_plan.debug_print</entry>
161+
<entry>
162+
Enables and selects the verbosity of the debug output of
163+
pg_hint_plan. off, on, detailed and verbose are valid.
164+
</entry>
165+
<entry>off</entry>
166+
</row>
167+
168+
<row>
169+
<entry>pg_hint_plan.message_level</entry>
170+
<entry>
171+
Specifies the message level of debug prints:
172+
<literal>error</literal>, <literal>warning</literal>,
173+
<literal>notice</literal>, <literal>info</literal>,
174+
<literal>log</literal>, <literal>debug</literal> are valid and
175+
fatal and panic are inhibited.
176+
</entry>
177+
<entry>info</entry>
178+
</row>
179+
</tbody>
180+
</tgroup>
181+
</table>
182+
179183
<para>
180184
PostgreSQL 9.1 requires a custom variable class to be defined
181185
for those GUC parameters. See <xref linkend="runtime-config-custom">
@@ -715,80 +719,175 @@ postgres=# WHERE aid IN (SELECT bid FROM pgbench_accounts a2 LIMIT 10);
715719
</variablelist>
716720
</sect2>
717721
<sect2 id="pg-hint-plan-hint-list">
718-
<title>Hints list</title>
722+
<title>Available Hints</title>
723+
719724
<para>The available hints are listed below.</para>
720-
<para>Group</para>
721-
<para>Format</para>
722-
<para>Description</para>
723-
<para>Scan method</para>
724-
<para>SeqScan(table)</para>
725-
<para>Forces sequential scan on the table</para>
726-
<para>TidScan(table)</para>
727-
<para>Forces TID scan on the table.</para>
728-
<para>IndexScan(table[ index...])</para>
729-
<para>Forces index scan on the table. Restricts to specified indexes if any.</para>
730-
<para>IndexOnlyScan(table[ index...])</para>
731-
<para>Forces index only scan on the table. Restricts to specified indexes
732-
if any. Index scan may be used if index only scan is not
733-
available. Available for PostgreSQL 9.2 and later.</para>
734-
<para>BitmapScan(table[ index...])</para>
735-
<para>Forces bitmap scan on the table. Restricts to specified indexes if any.</para>
736-
<para>NoSeqScan(table)</para>
737-
<para>Forces not to do sequential scan on the table.</para>
738-
<para>NoTidScan(table)</para>
739-
<para>Forces not to do TID scan on the table.</para>
740-
<para>NoIndexScan(table)</para>
741-
<para>Forces not to do index scan and index only scan (For PostgreSQL
742-
9.2 and later) on the table.</para>
743-
<para>NoIndexOnlyScan(table)</para>
744-
<para>Forces not to do index only scan on the table. Available for
745-
PostgreSQL 9.2 and later.</para>
746-
<para>NoBitmapScan(table)</para>
747-
<para>Forces not to do bitmap scan on the table.</para>
748-
<para>Join method</para>
749-
<para>NestLoop(table table[ table...])</para>
750-
<para>Forces nested loop for the joins consist of the specifiled tables.</para>
751-
<para>HashJoin(table table[ table...])</para>
752-
<para>Forces hash join for the joins consist of the specifiled tables.</para>
753-
<para>MergeJoin(table table[ table...])</para>
754-
<para>Forces merge join for the joins consist of the specifiled tables.</para>
755-
<para>NoNestLoop(table table[ table...])</para>
756-
<para>Forces not to do nested loop for the joins consist of the
757-
specifiled tables.</para>
758-
<para>NoHashJoin(table table[ table...])</para>
759-
<para>Forces not to do hash join for the joins consist of the specifiled tables.</para>
760-
<para>NoMergeJoin(table table[ table...])</para>
761-
<para>Forces not to do merge join for the joins consist of the specifiled tables.</para>
762-
<para>Join order</para>
763-
<para>Leading(table table[ table...])</para>
764-
<para>Forces join order as specified.</para>
765-
<para>Leading(&lt;join pair&gt;)</para>
766-
<para>Forces join order and directions as specified. A join pair is a
767-
pair of tables and/or other join pairs enclosed by parentheses,
768-
which can make a nested structure.</para>
769-
<para>Row number correction</para>
770-
<para>Rows(table table[ table...] correction)</para>
771-
<para>Corrects row number of a result of the joins consist of the
772-
specified tables. The available correction methods are absolute
773-
(#&lt;n&gt;), addition (+&lt;n&gt;), subtract
774-
(-&lt;n&gt;) and multiplication (*&lt;n&gt;). &lt;n&gt;
775-
should be a string that strtod() can read.</para>
776-
<para>GUC</para>
777-
<para>Set(GUC-param value)</para>
778-
<para>Set the GUC parameter to the value while planner is running.</para>
725+
726+
<table id="pg-hint-plan-hint-list-table">
727+
<title>Hints list</title>
728+
729+
<tgroup cols="3">
730+
<thead>
731+
<row>
732+
<entry>Group</entry>
733+
<entry>Format</entry>
734+
<entry>Description</entry>
735+
</row>
736+
</thead>
737+
738+
<tbody>
739+
<row>
740+
<entry>Scan method</entry>
741+
<entry>SeqScan(<replaceable>table</replaceable>)</entry>
742+
<entry>Forces sequential scan on the table.</entry>
743+
</row>
744+
745+
<row>
746+
<entry></entry>
747+
<entry>TidScan(<replaceable>table</replaceable>)</entry>
748+
<entry>Forces TID scan on the table.</entry>
749+
</row>
750+
751+
<row>
752+
<entry></entry>
753+
<entry>IndexScan(<replaceable>table</replaceable>[ <replaceable>index</replaceable>...])</entry>
754+
<entry>Forces index scan on the table. Restricts to specified indexes if any.</entry>
755+
</row>
756+
757+
<row>
758+
<entry></entry>
759+
<entry>IndexOnlyScan(<replaceable>table</replaceable>[ <replaceable>index</replaceable>...])</entry>
760+
<entry>
761+
Forces index only scan on the table. Restricts to specified indexes
762+
if any. Index scan may be used if index only scan is not
763+
available. Available for PostgreSQL 9.2 and later.
764+
</entry>
765+
</row>
766+
767+
<row>
768+
<entry></entry>
769+
<entry>BitmapScan(<replaceable>table</replaceable>[ <replaceable>index</replaceable>...])</entry>
770+
<entry>Forces bitmap scan on the table. Restricts to specified indexes if any.</entry>
771+
</row>
772+
773+
<row>
774+
<entry></entry>
775+
<entry>NoSeqScan(<replaceable>table</replaceable>)</entry>
776+
<entry>Forces not to do sequential scan on the table.</entry>
777+
</row>
778+
779+
<row>
780+
<entry></entry>
781+
<entry>NoTidScan(<replaceable>table</replaceable>)</entry>
782+
<entry>Forces not to do TID scan on the table.</entry>
783+
</row>
784+
785+
<row>
786+
<entry></entry>
787+
<entry>NoIndexScan(<replaceable>table</replaceable>)</entry>
788+
<entry>
789+
Forces not to do index scan and index only scan (For PostgreSQL
790+
9.2 and later) on the table.
791+
</entry>
792+
</row>
793+
794+
<row>
795+
<entry></entry>
796+
<entry>NoIndexOnlyScan(<replaceable>table</replaceable>)</entry>
797+
<entry>
798+
Forces not to do index only scan on the table. Available for
799+
PostgreSQL 9.2 and later.
800+
</entry>
801+
</row>
802+
803+
<row>
804+
<entry></entry>
805+
<entry>NoBitmapScan(<replaceable>table</replaceable>)</entry>
806+
<entry>Forces not to do bitmap scan on the table.</entry>
807+
</row>
808+
809+
<row>
810+
<entry>Join method</entry>
811+
<entry>NestLoop(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
812+
<entry>Forces nested loop for the joins with the specified tables.</entry>
813+
</row>
814+
815+
<row>
816+
<entry></entry>
817+
<entry>HashJoin(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
818+
<entry>Forces hash join for the joins with the specified tables.</entry>
819+
</row>
820+
821+
<row>
822+
<entry></entry>
823+
<entry>MergeJoin(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
824+
<entry>Forces merge join for the joins with the specified tables.</entry>
825+
</row>
826+
827+
<row>
828+
<entry></entry>
829+
<entry>NoNestLoop(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
830+
<entry>Forces not to do nested loop for the joins with the specified tables.</entry>
831+
</row>
832+
833+
<row>
834+
<entry></entry>
835+
<entry>NoHashJoin(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
836+
<entry>Forces not to do hash join for the joins with the specified tables.</entry>
837+
</row>
838+
839+
<row>
840+
<entry></entry>
841+
<entry>NoMergeJoin(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
842+
<entry>Forces not to do merge join for the joins with the specified tables.</entry>
843+
</row>
844+
845+
<row>
846+
<entry>Join order</entry>
847+
<entry>Leading(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...])</entry>
848+
<entry>Forces join order as specified.</entry>
849+
</row>
850+
851+
<row>
852+
<entry></entry>
853+
<entry>Leading(<replaceable>&lt;join pair&gt;</replaceable>)</entry>
854+
<entry>
855+
Forces join order and directions as specified. A join pair is a
856+
pair of tables and/or other join pairs enclosed in parentheses,
857+
which can make a nested structure.
858+
</entry>
859+
</row>
860+
861+
<row>
862+
<entry>Row number correction</entry>
863+
<entry>Rows(<replaceable>table</replaceable> <replaceable>table</replaceable>[ <replaceable>table</replaceable>...] <replaceable>correction</replaceable>)</entry>
864+
<entry>
865+
Corrects row number of a result of the joins with the
866+
specified tables. The available correction methods are absolute
867+
(#&lt;n&gt;), addition (+&lt;n&gt;), subtraction
868+
(-&lt;n&gt;) and multiplication (*&lt;n&gt;). &lt;n&gt;
869+
should be a string that strtod() can read.
870+
</entry>
871+
</row>
872+
873+
<row>
874+
<entry>GUC</entry>
875+
<entry>Set(<replaceable>GUC-parameter</replaceable> <replaceable>value</replaceable>)</entry>
876+
<entry>Set the GUC parameter to the value while planner is running.</entry>
877+
</row>
878+
</tbody>
879+
</tgroup>
880+
</table>
881+
882+
779883
</sect2>
780884
<sect2 id="pg-hint-plan-seealso">
781-
<title>See also</title>
782-
<sect3 id="pg-hint-plan-postgresql-document">
783-
<title>PostgreSQL documents</title>
784-
<para>
785-
<ulink url="http://www.postgresql.org/docs/current/static/sql-explain.html">EXPLAIN</ulink>
786-
<ulink url="http://www.postgresql.org/docs/current/static/sql-set.html">SET</ulink>
787-
<ulink url="http://www.postgresql.org/docs/current/static/runtime-config.html">Server Config</ulink>
788-
</para>
789-
<para>
790-
Copyright (c) 2012, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
791-
</para>
792-
</sect3>
885+
<title>See Also</title>
886+
887+
<simplelist type="inline">
888+
<member><xref linkend="sql-explain"></member>
889+
<member><xref linkend="sql-set"></member>
890+
<member><xref linkend="runtime-config"></member>
891+
</simplelist>
793892
</sect2>
794893
</sect1>

0 commit comments

Comments
 (0)