Re: Pull up aggregate subquery

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Pull up aggregate subquery
Дата
Msg-id BANLkTi=UifviKg_TRS4dnEa_yj3bNmotsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pull up aggregate subquery  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: Pull up aggregate subquery
Список pgsql-hackers
On Wed, May 25, 2011 at 1:37 PM, Hitoshi Harada <umi.tanuki@gmail.com> wrote:
>> How do you decide whether or not to push down?
>
> Yeah, that's the problem. In addition to the conditions of join-qual
> == grouping key && outer is unique on qual, we need some criteria if
> it should be done. At first I started to think I can compare cost of
> two different plan nodes, which are generated by calling
> subquery_planner() twice. But now my plan is to apply some heuristics
> like that join qual selectivity is less than 10% or so. I either don't
> like magic numbers but given Query restructuring instead of
> PlannerInfo (which means we cannot use Path) it is only left way. To
> get it work is my first goal anyway.

I think getting it working is probably a good first goal.  I am not
really sure that we want to commit it that way, and I think my vote
would be for you to work on the approach we discussed before rather
than this one, but it's your project, and I think you'll probably
learn enough in getting it working that it will be a step forward in
any case.  The planner is complex enough that it's worth trying to get
something that works, first, before trying to make it perfect.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: about EDITOR_LINENUMBER_SWITCH
Следующее
От: Pavan Deolasee
Дата:
Сообщение: Re: Proposal: Another attempt at vacuum improvements