mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
pg_plan_advice: Document interaction with GEQO.
The general nature of this interaction has been understood (at least by me) since before the original commit, but I failed to explicitly document it. I also left behind an XXX in the README which I intended to remove before commit. Fix those things. Reported-by: Noah Misch <noah@leadboat.com> Backpatch-through: 19 Discussion: https://postgr.es/m/CA+TgmoYmXy-jiP5qDhqNEiYFEBzQsArO6O2d9E8szNZqi1bePQ@mail.gmail.com
This commit is contained in:
@@ -263,5 +263,3 @@ good idea to incorporate that ability at some future point, as pg_hint_plan
|
||||
does. However, since the primary goal of the initial development work is to be
|
||||
able to induce the planner to recreate a desired plan that worked well in
|
||||
the past, this has not been included in the initial development effort.
|
||||
|
||||
XXX Need to investigate whether and how well supplying advice works with GEQO
|
||||
|
||||
@@ -812,6 +812,22 @@ EXPLAIN (COSTS OFF)
|
||||
force the choice of a plan which the planner refused to consider in the
|
||||
first place.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One consequence of the limitation described in the previous paragraph is
|
||||
that plan advice works only probabilistically when
|
||||
<link linkend="geqo"><acronym>GEQO</acronym></link> is used. Even if plans
|
||||
compatible with the supplied advice exist, there is no guarantee that any
|
||||
of them will be a part of the randomly generated pool of candidates. If
|
||||
not, the planner will generate a plan that does not comply with the
|
||||
supplied advice, with some parts of that plan marked disabled. If you
|
||||
supply advice that only mildly constrains join planning,
|
||||
<acronym>GEQO</acronym> will usually manage to find a plan that conforms
|
||||
with it; but if you wish to constrain it more substantially, you may need
|
||||
to disable <acronym>GEQO</acronym> in order to obtain satisfactory results.
|
||||
Note that scan advice is not affected by this limitation because it does
|
||||
not constrain the join order.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pgplanadvice-author">
|
||||
|
||||
Reference in New Issue
Block a user