Re: Planner hints in Postgresql

Поиск
Список
Период
Сортировка
Искать
От
Merlin Moncure
Тема
Re: Planner hints in Postgresql
Дата
Msg-id
CAHyXU0w4DKKq0V+soax+OGWNf0dc5Vk7DJftdtH0cMoDfd=c4Q@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Planner hints in Postgresql Rajmohan C <csrajmohan@gmail.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql David Johnston <polobo@yahoo.com>
Re: Planner hints in Postgresql Tom Lane <tgl@sss.pgh.pa.us>
Re: Planner hints in Postgresql Merlin Moncure <mmoncure@gmail.com>
Re: Planner hints in Postgresql Stephen Frost <sfrost@snowman.net>
Re: Planner hints in Postgresql Jim Nasby <jim@nasby.net>
Re: Planner hints in Postgresql Merlin Moncure <mmoncure@gmail.com>
Re: Planner hints in Postgresql Jim Nasby <jim@nasby.net>
Re: Planner hints in Postgresql Claudio Freire <klaussfreire@gmail.com>
Re: Planner hints in Postgresql Tom Lane <tgl@sss.pgh.pa.us>
Re: Planner hints in Postgresql Claudio Freire <klaussfreire@gmail.com>
Re: Planner hints in Postgresql Merlin Moncure <mmoncure@gmail.com>
Re: Planner hints in Postgresql Claudio Freire <klaussfreire@gmail.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Jeff Janes <jeff.janes@gmail.com>
Re: Planner hints in Postgresql Jim Nasby <jim@nasby.net>
Re: Planner hints in Postgresql Claudio Freire <klaussfreire@gmail.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Merlin Moncure <mmoncure@gmail.com>
Re: Planner hints in Postgresql Martijn van Oosterhout <kleptog@svana.org>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Tom Lane <tgl@sss.pgh.pa.us>
Re: Planner hints in Postgresql Pavel Stehule <pavel.stehule@gmail.com>
Re: Planner hints in Postgresql Merlin Moncure <mmoncure@gmail.com>
Re: Planner hints in Postgresql Jim Nasby <jim@nasby.net>
Re: Planner hints in Postgresql Claudio Freire <klaussfreire@gmail.com>
Re: Planner hints in Postgresql Jim Nasby <jim@nasby.net>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql David Johnston <polobo@yahoo.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Stephen Frost <sfrost@snowman.net>
Re: Planner hints in Postgresql Vik Fearing <vik.fearing@dalibo.com>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Stephen Frost <sfrost@snowman.net>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
Re: Planner hints in Postgresql Jeff Janes <jeff.janes@gmail.com>
Re: Planner hints in Postgresql Tom Lane <tgl@sss.pgh.pa.us>
Re: Planner hints in Postgresql Atri Sharma <atri.jiit@gmail.com>
On Mon, Mar 17, 2014 at 11:15 AM, Tom Lane  wrote:
> David Johnston  writes:
>> Need to discuss the general "why" before any meaningful help on the "how" is
>> going to be considered by hackers.
>
> Possibly worth noting is that in past discussions, we've concluded that
> the most sensible type of hint would not be "use this plan" at all, but
> "here's what to assume about the selectivity of this WHERE clause".
> That seems considerably less likely to break than any attempt to directly
> specify plan details.

Yeah -- the most common case I see is outlier culling where several
repeated low non-deterministic selectivity quals stack reducing the
row count estimate to 1.  For example:
SELECT * FROM foo WHERE length(bar) <= 1000 AND length(bar) >= 2;

The user may have special knowledge that the above is very (or very
un-) selective that is difficult or not cost effective to gather in
the general case.  IIRC in the archives (heh) there is a special
workaround using indexes and some discussion regarding how a
hypothetical feature involving user input selectivity estimates might
look.  I don't think that discussion is complete: the syntax for user
input selectivity is an unsolved problem.

There's a big difference between saying to the planner, "Use plan X"
vs "Here's some information describing the data supporting choosing
plan X intelligently".  The latter allows for better plans in the face
of varied/changing data, integrates with the planner in natural way,
and encourages users to understand how the planner works.

merlin


В списке pgsql-hackers по дате отправления
От: Atri Sharma
Дата:
От: Andres Freund
Дата:
FAQ