Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Date: 2007-12-17 13:47:54
Message-ID: 47667E0A.4040008@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gregory Stark wrote:
> "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-17 13:48:31 pgsql: Improve wording.
Previous Message Gokulakannan Somasundaram 2007-12-17 13:26:04 Re: Requesting clarification on Vacuuming/Freezing behaviour

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-12-17 14:12:57 Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Previous Message Gokulakannan Somasundaram 2007-12-17 13:24:34 Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)