Re: ALTER TABLE ADD COLUMN fast default - Mailing list pgsql-hackers

From David Rowley
Subject Re: ALTER TABLE ADD COLUMN fast default
Date
Msg-id CAKJS1f-TBVELVVW5PiQXDXELf+-wK-w3xbFuY0EkgmpMcwDycg@mail.gmail.com
Whole thread Raw
In response to Re: ALTER TABLE ADD COLUMN fast default  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: ALTER TABLE ADD COLUMN fast default  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 21 February 2018 at 00:38, David Rowley <david.rowley@2ndquadrant.com> wrote:
> Using: select sum(c10) from t;
>
...
> v11 + create.sql: tps = 3330.131437
> v11 + create-alter.sql: tps = 1398.635251

It seems the difference between these two cases is down to
slot_getsomeattrs being asked to deform up to attnum 1000 for the
create-alter.sql case, and only up to attnum 10 for the create.sql
case. Both plans are using physical tlists per EXPLAIN VERBOSE. I've
not managed to narrow down the reason for the difference yet. Looks
like it might take a bit of time with a debugger to find the point
where the code paths of the two cases diverge.


-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: "R, Siva"
Date:
Subject: Duplicate Item Pointers in Gin index
Next
From: David Rowley
Date:
Subject: Re: extern keyword incorrectly used in some function definitions