Re: nodeAgg perf tweak

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: nodeAgg perf tweak
Дата
Msg-id 1102038280.22124.232.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: nodeAgg perf tweak  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: nodeAgg perf tweak
Список pgsql-hackers
On Thu, 2004-12-02 at 19:07 -0500, Tom Lane wrote:
> True, but you still have to palloc if it returns the second argument.

Is that common? In any case, I don't see how you can _ever_ avoid a
palloc if the aggregate returns the second argument. The second argument
is in a per-tuple memory context: there's nothing the aggregate, or
nodeAgg, can do about it.

I think the tradeoffs between our patches are:

- mine would apply to all aggregates, without the need to modify any of
them individually
- yours would mean that int8inc() and similar aggregates wouldn't ever
need to do palloc(); mine would require a palloc() every k calls to the
transition function. I don't really see this as a problem: in practice k
will be sufficiently large that the palloc overhead should be
negligible.

-Neil




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Unicode characters above 0x10000 #2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: nodeAgg perf tweak