Re: *_collapse_limit, geqo_threshold

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: *_collapse_limit, geqo_threshold
Дата
Msg-id 6A6A6F6C-254B-4EF8-98E3-CE6BBE22F4DD@hi-media.com
обсуждение исходный текст
Ответ на Re: *_collapse_limit, geqo_threshold  (Greg Stark <gsstark@mit.edu>)
Ответы Re: *_collapse_limit, geqo_threshold  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Le 7 juil. 09 à 19:37, Greg Stark a écrit :
> I propose that there's a maximum reasonable planning time

It sounds so much like the planner_effort GUC that has been talked
about in the past...  http://archives.postgresql.org/pgsql-performance/2009-05/msg00137.php

...except this time you want to measure it in seconds. The problem
with measuring it in seconds is that when the time has elapsed, it's
uneasy to switch from classic to geqo and avoid beginning from scratch
again.
Would it be possible to start geqo from current planner state?

Another idea would be to have more complex metrics for deciding when
to run geqo, that is guesstimate the query planning difficulty very
quickly, based on more than just the number of relations in the from:
presence of subqueries, UNION, EXISTS, IN, or branches in where
clause, number of operators and index support for them, maybe some
information from the stats too... The idea would be to - set an effort threshold from where we'd better run geqo (GUC,

disabling possible) - if threshold enabled, compute metrics - if metric >= threshold, use geqo, if not, classic planner
-maybe default to disabling the threshold 

It seems it'd be easier to set the new GUC on a per query basis...

The obvious problem to this approach is that computing the metric will
take some time better spent at planning queries, but maybe we could
have fast path for easy queries, which will look a lot like $subject.

Regards,
--
dim

I hope this will give readers better ideas than its bare content...

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: WIP: generalized index constraints
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: *_collapse_limit, geqo_threshold