From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Gokulakannan Somasundaram" <gokul007(at)gmail(dot)com> |
Cc: | "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal for Null Bitmap Optimization(for Trailing NULLs) |
Date: | 2007-12-17 09:23:44 |
Message-ID: | 87k5ndptcv.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
"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. But I suspect it
might be possible to do it pretty cheaply or perhaps even for free. The extra
complexity would be pretty localized so I don't think that's a big downside.
> 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.
Actually this already works. *_deform_tuple has to be able to deal with tables
to which people have added columns. In that case tuples inserted before the
columns were added will look just as you describe, with trailing columns
missing.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-12-17 09:58:59 | Re: Proposal for Null Bitmap Optimization(for Trailing NULLs) |
Previous Message | Simon Riggs | 2007-12-17 09:20:34 | Re: WORM and Read Only Tables (v0.1) |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-12-17 09:58:59 | Re: Proposal for Null Bitmap Optimization(for Trailing NULLs) |
Previous Message | Gokulakannan Somasundaram | 2007-12-17 08:02:54 | Re: Proposal for Null Bitmap Optimization(for Trailing NULLs) |