Re: Column storage positions

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Column storage positions
Дата
Msg-id 45DCC3CC.4030206@dunslane.net
обсуждение исходный текст
Ответ на Re: Column storage positions  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: Column storage positions  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers

Stephan Szabo wrote:
>  What I was mentioning was that I was pretty sure that there
> was a message with someone saying that they actually tried something that
> did this and that they found left-most varchar access was slightly slower
> after the reordering although general access was faster. I believe the
> table case was alternating smallint and varchar columns, but I don't know
> what was tested for the retrieval. If that turns out to be able to be
> supported by other tests, then for some access patterns, the rearranged
> version might be slower.
>
>   

I would want to see this very carefully instrumented. Assuming we are 
putting all fixed size objects at the front, which seems like the best 
arrangement, then the position of every fixed field and the fixed 
portion of the position of every varlena field can be precalculated (and 
in the case of the leftmost varlena field that's it's complete 
position). So the extra effort in getting to the leftmost varchar field 
should be close to zero if this is done right, ISTM.

cheers

andrew


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: autovacuum next steps, take 2
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Column storage positions