Re: Redundant Result node

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Redundant Result node
Date: 2024-08-23 03:19:17
Message-ID: 2122722.1724383157@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> ... we'll always make a separate ProjectionPath on top of the SortPath
> in create_ordered_paths. It’s only when we create the plan node for
> the projection step in createplan.c that we realize a separate Result
> is unnecessary. This is not efficient.

I'm not sure you're considering "efficiency" in the right light.
In my mind, any time we can postpone work from path-creation time
to plan-creation time, we're probably winning because we create
many more paths than plans. Perhaps that's wrong in this case,
but it's not anywhere near as obvious as you suggest.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-08-23 03:26:30 Re: Detailed release notes
Previous Message Richard Guo 2024-08-23 03:08:47 Re: Redundant Result node