Re: speeding up planning with partitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, Imai Yoshikazu <yoshikazu_i443(at)live(dot)jp>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, "jesper(dot)pedersen(at)redhat(dot)com" <jesper(dot)pedersen(at)redhat(dot)com>, "Imai, Yoshikazu" <imai(dot)yoshikazu(at)jp(dot)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: speeding up planning with partitions
Date: 2019-04-01 14:29:14
Message-ID: 8106.1554128954@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> writes:
> On 2019/04/01 3:46, Tom Lane wrote:
>> One thing that I intentionally left out of the committed patch was changes
>> to stop short of scanning the whole simple_rel_array when looking only for
>> baserels. I thought that had been done in a rather piecemeal fashion
>> and it'd be better to address it holistically, which I've now done in the
>> attached proposed patch.
>> I have not done any performance testing to see if this is actually
>> worth the trouble, though. Anybody want to do that?

> Thanks for creating the patch.

> I spent some time looking for cases where this patch would provide
> recognizable benefit, but couldn't find one.

Yeah, I was afraid of that. In cases where we do have a ton of otherrels,
the processing that's actually needed on them would probably swamp any
savings from this patch.

The only place where that might possibly not be true is
create_lateral_join_info, since that has nested loops that could
potentially impose an O(N^2) cost. However, since your patch went in,
that runs before inheritance expansion anyway.

So this probably isn't worth even the minuscule cost it imposes.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robbie Harwood 2019-04-01 15:13:24 Re: [PATCH v22] GSSAPI encryption support
Previous Message Noah Misch 2019-04-01 13:52:13 Extending USE_MODULE_DB to more test suite types