Re: Redundant Result node - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Redundant Result node
Date
Msg-id 2127813.1724385375@sss.pgh.pa.us
Whole thread Raw
In response to Re: Redundant Result node  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Fri, Aug 23, 2024 at 11:19 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm not sure you're considering "efficiency" in the right light.

> I agree that it’s always desirable to postpone work from path-creation
> time to plan-creation time.  In this case, however, it’s a little
> different.  The projection step could actually be avoided from the
> start if we perform the correct check in create_ordered_paths.

Well, the question is how expensive is the "correct check" compared
to what we're doing now.  It might be cheaper than creating an extra
level of path node, or it might not.  An important factor here is
that we'd pay the extra cost of a more complex check every time,
whether it avoids creation of an extra path node or not.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Redundant Result node
Next
From: shveta malik
Date:
Subject: Re: Conflict Detection and Resolution