Re: Proposal for Null Bitmap Optimization(for Trailing NULLs) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Date
Msg-id 47667E0A.4040008@dunslane.net
Whole thread Raw
In response to Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers

Gregory Stark wrote:
> "Gokulakannan Somasundaram" <gokul007@gmail.com> writes:
>
>   
>> a) By modifying the functions, heap_form_tuple and heap_fill_tuple, we can
>> check whether all the nulls are trailing nulls. If all the nulls are
>> trailing nulls, then we will not set the has_null flag and we will not have
>> the null bitmap with the tuple.
>>     
>
> I think that would work. The only question is whether it's worth bothering
> since we would have to check it on every heap_form_tuple. 
>   
This strikes me as such a corner case that it's likely not to be worth it.

If you really want to save space along these lines, one better place to 
start might  be mutable with column ordering - see 
http://archives.postgresql.org/pgsql-hackers/2006-12/msg00983.php . That 
would mean that we would be able to move nullable columns physically to 
the tail which in turn might help this suggestion have more effect.

cheers

andrew


pgsql-hackers by date:

Previous
From: "Gokulakannan Somasundaram"
Date:
Subject: Re: Requesting clarification on Vacuuming/Freezing behaviour
Next
From: Simon Riggs
Date:
Subject: Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)