From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
Date: Thu, 28 Jan 2016 16:15:49 +0900
Message-ID: <56A9C025.3050603@lab.ntt.co.jp> (raw)
In-Reply-To: <CA+TgmobP+Rxu2xkEiRB9PgPhj6DFjkS41+HRiOfbK7bL6Gt7pw@mail.gmail.com>
References: <20160120220419.GA380317@alvherre.pgsql>
<56A0B927.7050105@lab.ntt.co.jp>
<CA+TgmobP+Rxu2xkEiRB9PgPhj6DFjkS41+HRiOfbK7bL6Gt7pw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2016/01/28 12:13, Robert Haas wrote:
> On Thu, Jan 21, 2016 at 5:55 AM, Etsuro Fujita
> <fujita.etsuro@lab.ntt.co.jp> wrote:
>> On 2016/01/21 7:04, Alvaro Herrera wrote:
>>> Etsuro Fujita wrote:
>>>>
>>>> On second thought, I noticed that detecting whether we see a system
>>>> column
>>>> that way needs more cycles in cases where the reltargetlist and the
>>>> restriction clauses don't contain any system columns. ISTM that such
>>>> cases
>>>> are rather common, so I'm inclined to keep that code as-is.
>>> Ah, I see now what you did there. I was thinking you'd have the
>>> foreach(restrictinfo) loop, then once the loop is complete scan the
>>> bitmapset; not scan the bitmap set scan inside the other loop.
>> Ah, I got to the point. I think that is a good idea. The additional cycles
>> for the worst case are bounded and negligible. Please find attached an
>> updated patch.
> I don't think this is a good idea. Most of the time, no system
> columns will be present, and we'll just be scanning the Bitmapset
> twice rather than once. Sure, that doesn't take many extra cycles,
> but if the point of all this is to micro-optimize this code, that
> particular change is going in the wrong direction.
I thought that is a good idea, considering the additional overhead is
little, because that would be useful for some use-cases. But I think we
need more discussions about that, so if there are no objections from
Alvaro (or anyone), I'll leave that part as-is.
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: fujita.etsuro@lab.ntt.co.jp, robertmhaas@gmail.com, alvherre@2ndquadrant.com, michael.paquier@gmail.com
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan
In-Reply-To: <56A9C025.3050603@lab.ntt.co.jp>
References: <20160120220419.GA380317@alvherre.pgsql> <56A0B927.7050105@lab.ntt.co.jp> <CA+TgmobP+Rxu2xkEiRB9PgPhj6DFjkS41+HRiOfbK7bL6Gt7pw@mail.gmail.com> <56A9C025.3050603@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox