Re: Column storage positions

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

Gregory Stark wrote:
> "Andrew Dunstan" <andrew@dunslane.net> writes:
>
>   
>> 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). 
>>     
>
> I'm not sure what you mean by "the fixed portion of the position of every
> varlena field". Fields are just stuck one after the other (plus alignment)
> skipping nulls. So any field after a null or varlena field can't have its
> position cached at all.
>   

I'd forgotten about nulls :-( . Nevertheless, it's hard to think of a 
case where the penalty for shifting fixed size fields to the front is 
going to be very big. If we really wanted to optimise for speed for some 
varlena case, we'd probably need to keep stats on usage patterns, but 
that seems like massive overkill.

cheers

andrew


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: autovacuum next steps, take 2
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Column storage positions