From: | Emanuel Calvo <3manuek(at)esdebian(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Turning off HOT/Cleanup sometimes |
Date: | 2014-09-15 23:38:17 |
Message-ID: | 54177869.5000208@esdebian.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
El 14/09/14 17:37, Simon Riggs escribió:
> On 12 September 2014 18:19, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> On 12 September 2014 15:30, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> After a little bit I remembered there was already a function for this.
>>> So specifically, I'd suggest using ExecRelationIsTargetRelation()
>>> to decide whether to mark the scan as requiring pruning.
>> Sounds cool. Thanks both, this is sounding like a viable route now.
> Yes, this is viable.
>
> Patch attached, using Alvaro's idea of use-case specific pruning and
> Tom's idea of aiming at target relations. Patch uses or extends
> existing infrastructure, so its shorter than it might have been, yet
> with all that bufmgr yuck removed.
>
> This is very, very good because while going through this I notice the
> dozen or more places where we were pruning blocks in annoying places I
> didn't even know about such as about 4-5 constraint checks. In more
> than a few DDL commands like ALTER TABLE and CLUSTER we were even
> pruning the old relation prior to rewrite.
>
A simple performance test with the following variables:
LOOP=50
CONN=60
TXSS=500
SCALE=30
Select only:
WITH PATCH
Average: 20716.1 tps
NO PATCH
Average: 19141.7 tps
With writes:
WITH PATCH
Average: 2602.65
NO PATCH
Average: 2565.32
TODO:
- Consistency check.
- ALTER and CLUSTER test.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2014-09-15 23:44:07 | Re: jsonb format is pessimal for toast compression |
Previous Message | Peter Geoghegan | 2014-09-15 23:21:06 | Re: B-Tree support function number 3 (strxfrm() optimization) |