pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ehab Galal <ehabgalal123@hotmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: materialize
Date: Mon, 26 Nov 2007 16:53:45 -0500
Message-ID: <4140.1196114025@sss.pgh.pa.us> (raw)
In-Reply-To: <BAY138-W1297C42D3E676BE815771E96750@phx.gbl>
References: <BAY138-W43A1A93DB7B84F57B84211968F0@phx.gbl>
	<14450.1194194136@sss.pgh.pa.us>
	<BAY138-W1297C42D3E676BE815771E96750@phx.gbl>

Ehab Galal <ehabgalal123@hotmail.com> writes:
> I was wondering why do we need the Materialize node in the plan below when i explain a query? 

It's cheaper to scan a materialized rowset many times than a raw table
--- we don't need to re-access shared memory nor re-check row visibility.

			regards, tom lane



view thread (2+ messages)

Message-ID: <4140.1196114025@sss.pgh.pa.us>
Permalink:  ../4140.1196114025@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4140.1196114025@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ehabgalal123@hotmail.com
  Subject: Re: materialize
  In-Reply-To: <4140.1196114025@sss.pgh.pa.us>

* 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