Re: ModifyTable overheads in generic plans

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Subject: Re: ModifyTable overheads in generic plans
Date: 2021-04-08 03:32:43
Message-ID: CA+HiwqE2cprXZVxQ4t9XK=HTSiAK6mOHbhCGyUj=zNntCxAi4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 8, 2021 at 3:02 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Wed, Apr 7, 2021 at 12:34 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Indeed, that's a pretty impressive comparison.
>
> > +1. That looks like a big improvement.
>
> > In a vacuum, you'd hope that partitioning a table would make things
> > faster rather than slower, when only one partition is implicated. Or
> > at least that the speed would stay about the same. And, while this is
> > a lot better, we're clearly not there yet. So I hope that, in future
> > releases, we can continue to find ways to whittle down the overhead.
>
> Note that this test case includes plan_cache_mode = force_generic_plan,
> so it's deliberately kneecapping our ability to tell that "only one
> partition is implicated".

For the record, here are the numbers for plan_cache_mode = auto.
(Actually, plancache.c always goes with custom planning for
partitioned tables.)

v13.2
nparts 10cols 20cols 40cols

64 13391 12140 10958
128 13436 12297 10643
256 12564 12294 10355
1024 11450 10600 9020

v14dev HEAD

64 14925 14648 13361
128 14379 14333 13138
256 14478 14246 13316
1024 12744 12621 11579

There's 10-20% improvement in this case too for various partition
counts, which really has more to do with 86dc90056 than the work done
here.

--
Amit Langote
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-04-08 03:47:13 Re: Minimal logical decoding on standbys
Previous Message Michael Paquier 2021-04-08 03:28:34 Re: SQL-standard function body