Skip site navigation (1) Skip section navigation (2)

Proposal for Null Bitmap Optimization(for Trailing NULLs)

From: "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com>
To: "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Date: 2007-12-17 07:40:48
Message-ID: 9362e74e0712162340j294c37e7q69d0c52b17acb614@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hi,
    Currently we check for the existence of NULL values in the tuple and we
set the has_null flag. If the has_null flag is present, the tuple will be
storing a null bitmap. What i propose is

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.

b) While selecting the tuple, we will check whether the tuple offset equals
/ exceeds the length of the tuple and then mark the remaining attributes of
the tuple as null. To be exact, we need to modify the slot_deform_tuple in
order to achieve the same.

This may not give huge performance benefits, but as you may know, it will
help is reducing the disk footprint.


Expecting your comments..

-- 
Thanks,
Gokul.
CertoSQL Project,
Allied Solution Group.
(www.alliedgroups.com)

Responses

pgsql-hackers by date

Next:From: Gokulakannan SomasundaramDate: 2007-12-17 07:47:21
Subject: Requesting clarification on Vacuuming/Freezing behaviour
Previous:From: NikhilSDate: 2007-12-17 07:35:35
Subject: Re: VLDB Features

pgsql-patches by date

Next:From: Gokulakannan SomasundaramDate: 2007-12-17 08:02:54
Subject: Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Previous:From: Peter EisentrautDate: 2007-12-16 13:16:09
Subject: Re: Auto create (top level) directory for create tablespace

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group