Re: patch for geqo tweaks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch for geqo tweaks
Дата
Msg-id 2837.1446837401@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: patch for geqo tweaks  (Nathan Wagner <nw+pg@hydaspes.if.org>)
Ответы Re: patch for geqo tweaks
Список pgsql-hackers
Nathan Wagner <nw+pg@hydaspes.if.org> writes:
> On Fri, Nov 06, 2015 at 11:45:38AM -0500, Tom Lane wrote:
>> (There's a fair amount of dead code in /geqo/, which I've never had
>> the energy to clean up, but maybe we should do that sometime.  It
>> seems unlikely that anyone will ever be interested in experimenting
>> with the ifdef'ed-out code paths.)

> I also note that in  src/backend/optimizer/path/allpaths.c there is a
> join_search_hook variable apparently intended for plugins (extensions?)
> to be able to control the search path optimizer.  And the geqo code is
> AFAICT turned off by default anyway, so none of the code is used in
> probably the vast majority of systems, with standard_join_search() being
> called instead.

Uh, what?  It's not by any means turned off by default.

postgres=# select name,setting from pg_settings where name like '%geqo%';       name         | setting 
---------------------+---------geqo                | ongeqo_effort         | 5geqo_generations    | 0geqo_pool_size
| 0geqo_seed           | 0geqo_selection_bias | 2geqo_threshold      | 12
 
(7 rows)

You do need at least 12 tables in the FROM list to get it to be exercised
with the default settings, which among other things means that our
regression tests don't stress it much at all.  But it's definitely
reachable.

> Would it be worth either of removing at least the non-ERX portions of
> the geqo code, or removing the geqo code entirely (presumably with a
> deprecation cycle) and moving it to an extension?

Removing it is right out, as you'll soon find if you try to plan a query
with a couple dozen tables with geqo turned off.  The standard exhaustive
search just gets too slow.

I'm inclined to think that removing all the ifdefd-out-by-default logic
would be a fine thing to do, though.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Getting sorted data from foreign server for merge join
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: SortSupport for UUID type