Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKkMY-004IdF-Vd for pgsql-performance@arkaria.postgresql.org; Tue, 02 Jan 2024 19:23:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rKkMX-0011qJ-KQ for pgsql-performance@arkaria.postgresql.org; Tue, 02 Jan 2024 19:23:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKkMX-0011qA-AJ for pgsql-performance@lists.postgresql.org; Tue, 02 Jan 2024 19:23:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rKkMV-00FCa0-7n for pgsql-performance@lists.postgresql.org; Tue, 02 Jan 2024 19:23:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 402JNajL4115744; Tue, 2 Jan 2024 14:23:36 -0500 From: Tom Lane To: Jeff Janes cc: Jerry Brenner , pgsql-performance@lists.postgresql.org Subject: Re: Questions about "Output" in EXPLAIN ANALYZE VERBOSE In-reply-to: References: Comments: In-reply-to Jeff Janes message dated "Tue, 02 Jan 2024 14:15:52 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <4115742.1704223416.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 Jan 2024 14:23:36 -0500 Message-ID: <4115743.1704223416@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Janes writes: > On Tue, Jan 2, 2024 at 1:29=E2=80=AFPM Jerry Brenner 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