Re: Design notes for EquivalenceClasses

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема Re: Design notes for EquivalenceClasses
Дата
Msg-id Pine.LNX.4.58.0701181149190.26830@linuxworld.com.au
обсуждение исходный текст
Ответ на Re: Design notes for EquivalenceClasses  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Design notes for EquivalenceClasses  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
On Wed, 17 Jan 2007, Tom Lane wrote:

> Gavin Sherry <swm@linuxworld.com.au> writes:
> > I was thinking about this, but in relation to hash joins. A hash join
> > cannot be guaranteed to produce output sorted according to the pathkey of
> > the outer relation (as explained in the existing README). I wonder,
> > however, if it might be useful for hash join to pass a hint that the
> > output is known ordered (i.e., the join was not split into multiple
> > batches).
>
> Yeah, I've considered that, but I think it'd have to be the other way
> around: the planner tells the executor that it's assuming the output is
> sorted, hence do not split into multiple batches.  This has the usual
> assortment of problems if the planner has badly misestimated the
> rowcount :-(

Yep, I thought of that and discarded it for the reason you state.

I still think there would be some benefit to passing a hint up the
execution tree, effectively turning explicit sorts into no ops. This,
however, breaks the major rule in the executor: do what ever the plan
tells you to do.

Thanks,

Gavin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function execution costs 'n all that
Следующее
От: "Takayuki Tsunakawa"
Дата:
Сообщение: Re: Idea for fixing the Windows fsync problem