Re: hash agg is slower on wide tables?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: hash agg is slower on wide tables?
Дата
Msg-id 15176.1424617111@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: hash agg is slower on wide tables?  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: hash agg is slower on wide tables?  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> I've wondered before if we shouldn't use the caching via
> slot->tts_values so freely - if you only use a couple values from a wide
> tuple the current implementation really sucks if those few aren't at the
> beginning of the tuple.

Don't see how you expect to get a win that way.  Visiting column k
requires crawling over columns 1..k-1 in practically all cases.
You could maybe save a cycle or so by omitting the physical store
into the Datum array, assuming that you never did need the column
value later ... but the extra bookkeeping for more complicated
tracking of which columns had been extracted would eat that savings
handily.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: SSL renegotiation
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)