Re: Pull up aggregate subquery

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: Pull up aggregate subquery
Дата
Msg-id BANLkTik3M-K8sc2hhHmyT-mpVD6rSB2acQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pull up aggregate subquery  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: Pull up aggregate subquery
Re: Pull up aggregate subquery
Список pgsql-hackers
2011/5/25 Hitoshi Harada <umi.tanuki@gmail.com>:
> So I'm still
> thinking which of pulling up and parameterized scan is better.

After more investigation I came up with third idea, pushing down
RangeTblEntry to aggregate subquery. This sounds like a crazy idea,
but it seems to me like it is slightly easier than pulling up
agg-subquery. The main point is that when you want to pull up, you
must care if the final output would be correct with other join
relations than the aggregate-related one. In contrast, when pushing
down the target relation to agg-subquery it is simple to ensure the
result.

I'm looking around pull_up_subqueries() in subquery_planner() to add
the pushing down logic. It could be possible to do it around
make_one_rel() but I bet query structure changes are doable against
Query, not PlannerInfo.

I appreciate any comments.

Regards,

-- 
Hitoshi Harada


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reducing overhead of frequent table locks
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Expression Evaluator used for creating the plan tree / stmt ?