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

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

From: "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>, "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal for Null Bitmap Optimization(for Trailing NULLs)
Date: 2008-03-21 17:59:04
Message-ID: 9362e74e0803211059p1333287ewd888c15cf891a2d7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I would work on this and try to present the performance test results.
I would also go ahead and examine, whether the logic can be added into
heap_form_tuple by any means.

Thanks,
Gokul.

On Wed, Mar 19, 2008 at 12:11 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

>
> Added to TODO:
>
>        * Consider not storing a NULL bitmap on disk if all the NULLs are
>          trailing
>
>          http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php
>          http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php
>
> Tom's comments are:
>
>        What this lacks is some performance testing to measure the cost of
> the
>        extra tests in heap_form_tuple. If that can be shown to be
> negligible
>        then it's probably worth doing .... though I don't like any part of
> the
>        actually submitted patch ;-). All this should need is a bit more
> logic
>        in heap_form_tuple and heap_formtuple.
>
>
> ---------------------------------------------------------------------------
>
> Gokulakannan Somasundaram wrote:
> > 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)
>
> --
>  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
>  EnterpriseDB                             http://postgres.enterprisedb.com
>
>  + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2008-03-21 19:01:03
Subject: Re: Commit Fest (was Re: Sort Refinement)
Previous:From: Andrew DunstanDate: 2008-03-21 17:45:11
Subject: Re: Commit Fest (was Re: Sort Refinement)

pgsql-patches by date

Next:From: Tom LaneDate: 2008-03-21 21:18:59
Subject: Re: Logging conflicted queries on deadlocks
Previous:From: Simon RiggsDate: 2008-03-21 17:01:35
Subject: Re: Auto Partitioning Patch - WIP version 1

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