From: | "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com> |
---|---|
To: | Decibel! <decibel(at)decibel(dot)org> |
Cc: | "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>, pgsql-patches(at)postgresql(dot)org, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Subject: | Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs) |
Date: | 2007-12-25 18:04:38 |
Message-ID: | 9362e74e0712251004p6115193dncd6e65326bdc2291@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Hi,
Back from the holiday times. I have tried to present the proof, that the
null bitmap was absent in the table with the trailing nulls.
On Dec 22, 2007 4:43 AM, Decibel! <decibel(at)decibel(dot)org> wrote:
> On Dec 20, 2007, at 2:36 AM, Gokulakannan Somasundaram wrote:
> > I checked it by creating a table with 10 columns on a 32 bit
> > machine. i inserted 100,000 rows with trailing nulls and i observed
> > savings of 400Kbytes.
>
>
> That doesn't really tell us anything...
As i said that the patch removes the null bitmap, if the tuple has trailing
nulls. Our tuple size without null bitmap is 23 bytes. Currently, as long as
the table has less than 8 columns(with null), the heaptuple header size will
be 24 bytes. But if the tuple has more than 8 columns, then it will occupy 4
more bytes in a 32 bit system and 8 more bytes in a 64 bit system. This
patch attempts to save that extra space, if the tuple has only trailing
nulls
> how big was the table
> originally?
I think it was 5.5 M and 5.1M before and after applying the patch. But how
is this relevant? The patch saves 4 bytes in a 32 bit system per tuple,
irrespective of the size of the tuple
> Also, testing on 64 bit would be interesting.
I tested the patch on 64 bit system also for regression. The saving was 8
bytes per tuple.
I have attempted to provide an explanation. But i don't know whether i have
answered your doubts exactly.
Please revert back, in case you haven't got clarified.
--
Thanks,
Gokul.
CertoSQL Project,
Allied Solution Group.
(www.alliedgroups.com)
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas 'ads' Scherbaum | 2007-12-25 22:21:41 | Re: Binary data type with other output method |
Previous Message | imad | 2007-12-25 17:12:23 | Re: Binary data type with other output method |
From | Date | Subject | |
---|---|---|---|
Next Message | Hans-Juergen Schoenig | 2007-12-27 08:37:19 | CONNECT BY for 8.3 ... |
Previous Message | Decibel! | 2007-12-24 20:50:37 | Re: Proposed patch to disallow password=foo in database name parameter |