Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]

From: Noah Misch <noah(at)leadboat(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, robertmhaas(at)gmail(dot)com, josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org, jameisonb(at)yahoo(dot)com
Subject: Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]
Date: 2013-01-24 02:12:05
Message-ID: 20130124021205.GB29954@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 09, 2013 at 11:22:06AM +0000, Simon Riggs wrote:
> On 24 December 2012 16:57, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> > Performance: Average of 3 runs of pgbench in tps
> > 9.3devel | with trailing null patch
> > ----------+--------------------------
> > 578.9872 | 573.4980
>
> On balance, it would seem optimizing for this special case would
> affect everybody negatively; not much, but enough. Which means we
> should rekect this patch.
>
> Do you have a reason why a different view might be taken?

We've mostly ignored performance changes of a few percentage points, because
the global consequences of adding or removing code to the binary image can
easily change performance that much. It would be great to get to the point
where we can reason about 1% performance changes, but we're not there. If a
measured +1% performance change would have yielded a different decision, we
should rethink the decision based on more-robust criteria.

(Most of this was said in initial April 2012 discussion.) This patch is a
tough one, because it will rarely help the most-common workloads. If it can
reduce the tuple natts from 9 to 8, the tuple shrinks by a respectable eight
bytes. But if it reduces natts from 72 to 9, we save nothing. It pays off
nicely for the widest, sparsest tables: say, a table with 1000 columns, all
but ten are NULL, and those non-NULL columns are near the front of the table.
I've never seen such a design, but a few folks seemed to find it credible.

I've failed to come up with a non-arbitrary reason to recommend for or against
this patch, so I profess neutrality on the ultimate issue.

Thanks,
nm

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-01-24 02:26:15 BUG #7814: Rotation of the log is not carried out.
Previous Message Noah Misch 2013-01-24 01:38:25 Re: Visual Studio 2012 RC