Re: DELETE with LIMIT (or my first hack)

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: DELETE with LIMIT (or my first hack)
Дата
Msg-id 1291146339.30414.10.camel@jdavis-ux.asterdata.local
обсуждение исходный текст
Ответ на Re: DELETE with LIMIT (or my first hack)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: DELETE with LIMIT (or my first hack)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, 2010-11-30 at 11:12 -0500, Robert Haas wrote:
> > 3. This doesn't work tremendously well for inheritance trees, where
> > ModifyTable acts as sort of an implicit Append node.  You can't just
> > funnel all the tuples through one Sort or Limit node because they aren't
> > all the same rowtype.  (Limit might perhaps not care, but Sort will.)
> > But you can't have a separate Sort/Limit for each table either, because
> > that would give the wrong behavior.  Another problem with funneling all
> > the rows through one Sort/Limit is that ModifyTable did need to know
> > which table each row came from, so it can apply the modify to the right
> > table.
> 
> Could you possibly have ModifyTable -> Limit -> MergeAppend?

Before MergeAppend knows which tuple to produce, it needs to see the
tuples (at least the first one from each of its children), meaning that
it needs to pull them through ModifyTable; and at that point it's
already too late.

Also, assuming LIMIT K, MergeAppend will have N children, meaning N
limits, meaning an effective limit of K*N rather than K.

Can you be a little more specific about what you mean?

Regards,Jeff Davis



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: profiling connection overhead
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: DELETE with LIMIT (or my first hack)