Re: Composite Datums containing toasted fields are a bad idea(?)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Composite Datums containing toasted fields are a bad idea(?)
Дата
Msg-id 20140421154036.GA3098@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Composite Datums containing toasted fields are a bad idea(?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Composite Datums containing toasted fields are a bad idea(?)  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On 2014-04-21 11:30:57 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > I unfortunately haven't followed this in detail, but shouldn't it be
> > relatively easily to make this even cheaper by checking for
> > HEAP_HASEXTERNAL?  If it's not set we don't need to iterate over the
> > composite's columns, right?
> 
> That's the point I made further down:

Oh, sorry. I started reading this thread from the end just now.

> we could do that if we were willing
> to abandon the principle that nested fields shouldn't be compressed.
> It's not very clear what it'd cost us to give that up.

I don't think the cost of that would be all that high. As you argue,
without that trick the cost of iterating over all columns will be paid
all the time, whereas double compression will take effect much less
often. And might even end up being beneficial.
The risk of significant performance regressions due to backpatching
seems significantly less likely if we pay heed to HASEXTERNAL.

> (Too bad we didn't define a HEAP_HASCOMPRESSED flag bit ...)

And too bad that infomask bits are so scarce :(. We really need to
reclaim HEAP_MOVED_OFF and HEAP_MOVED_IN.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD