On 24 December 2012 13:13, Amit Kapila <amit.kap...@huawei.com> wrote:
> Apart from above, the performance data for less number of columns (where the > trailing nulls are such that they cross word boundary) also show similar > gains: > > The below cases (2 & 3) can give benefit as it will save 4 bytes per tuple > > 2. Table with 12 columns (first 3 integer followed by 9 Boolean columns) > A. INSERT tuples with 9 trailing nulls > B. UPDATE last column value to "non-null" > C. UPDATE last column value to "null" > ---------------------+---------------------+--------------------- > Original Code | Trim Tailing NULLs | Improvement (%) > TPS space used| TPS space used | Results > (pages) | (pages) | > ---------------------+---------------------+---------------------- > 2A: 0.8485 12739 | 0.8524 10811 | 0.4% 15.1% > 2B: 0.5847 25478 | 0.5749 23550 | -1.5% 7.5% > 2C: 0.5591 38217 | 0.5545 34361 | 0.8% 10.0% > > > 3. Table with 12 columns (first 3 integer followed by 9 Boolean columns) > A. INSERT tuples with 4 trailing nulls > B. UPDATE last column value to "non-null" > C. UPDATE last column value to "null" > ---------------------+---------------------+--------------------- > Original Code | Trim Tailing NULLs | Improvement (%) > TPS space used| TPS space used | Results > (pages) | (pages) | > ---------------------+---------------------+---------------------- > 3A: 0.8443 14706 | 0.8626 12739 | 2.3% 13.3% > 3B: 0.5307 29412 | 0.5272 27445 | -0.6% 6.7% > 3C: 0.5102 44118 | 0.5218 40184 | 2.2% 8.9% > > As a conclusion point, I would like to say that this patch doesn't have > performance regression for most used scenario's > and it gives benefit in some of the trailing null's cases. Not really sure about the 100s of columns use case. But showing gain in useful places in these more common cases wins my vote. Thanks for testing. Barring objections, will commit. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers