Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Jerry Brenner <jbrenner(at)guidewire(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE
Date: 2024-01-02 19:23:36
Message-ID: 4115743.1704223416@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> On Tue, Jan 2, 2024 at 1:29 PM Jerry Brenner <jbrenner(at)guidewire(dot)com> wrote:
>> - It looks like "Output" includes more than just the columns with
>> predicates and/or being accessed or returned in other nodes.

> Not in my hands. For SELECTs it just lists the columns that are needed.

It depends. The planner may choose to tell a non-top-level scan node
to return all columns, in hopes of saving a tuple projection step at
runtime. That's heuristic and depends on a number of factors, so you
shouldn't count on it happening or not happening.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jerry Brenner 2024-01-02 21:27:23 Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE
Previous Message Jeff Janes 2024-01-02 19:15:52 Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE