From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap |
Date: | 2012-04-27 10:06:02 |
Message-ID: | CA+U5nM+SFM75b8ozCBT8HSrCT05mw1ZOBe0W83mc2-t0nzUq0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 27, 2012 at 1:51 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> Now, the other issue I'd be worried about for this optimization is what
> happens when the nulls become non-trailing? For example, this pattern:
>
> 1. Out of 700 columns, columns 301+ are all Null, so we map them away.
> 2. User updates column 688 to non-null
> 3. Suddenly we have a MUCH larger row which will no longer fit on the page.
>
> If your application had a lot of that kind of update pattern, I'd be
> concerned that this would be a deoptimzation.
Currently, we have a long row before and a long row after. Jamie's
proposals would give us a short row before and a long row after.
Since we don't ever update in place, we're much more likely to fit on
the same page with this optimisation than without it. I guess we can
check that with a performance test.
(Perhaps a more obvious optimisation would be to use a compressed NULL
bitmap. That would respond better in a wider range of use cases than
just truncation of trailing zeroes.)
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Abbas Butt | 2012-04-27 12:25:26 | A problem with dump/restore of views containing whole row references |
Previous Message | Simon Riggs | 2012-04-27 08:18:32 | Re: Future In-Core Replication |