Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1A08E2E017A for ; Mon, 26 Nov 2007 17:17:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22782-10 for ; Mon, 26 Nov 2007 17:17:19 -0400 (AST) Received: from bay0-omc2-s38.bay0.hotmail.com (bay0-omc2-s38.bay0.hotmail.com [65.54.246.174]) by postgresql.org (Postfix) with ESMTP id A1BC92E0049 for ; Mon, 26 Nov 2007 17:17:18 -0400 (AST) Received: from BAY138-W12 ([64.4.49.47]) by bay0-omc2-s38.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 26 Nov 2007 13:17:14 -0800 Message-ID: Content-Type: multipart/alternative; boundary="_cc0d1424-d982-4f70-94ca-dcc012f80a63_" X-Originating-IP: [128.10.9.112] From: Ehab Galal To: "pgsql-sql@postgresql.org" Subject: materialize Date: Mon, 26 Nov 2007 16:17:14 -0500 Importance: Normal In-Reply-To: <14450.1194194136@sss.pgh.pa.us> References: <14450.1194194136@sss.pgh.pa.us> MIME-Version: 1.0 X-OriginalArrivalTime: 26 Nov 2007 21:17:14.0559 (UTC) FILETIME=[B75974F0:01C83071] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/131 X-Sequence-Number: 29659 --_cc0d1424-d982-4f70-94ca-dcc012f80a63_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Greetings, I was wondering why do we need the Materialize node in the plan below when = i explain a query?=20 1: QUERY PLAN =3D "Nested Loop (cost=3D10.99..24.34 rows=3D1 width=3D846)"= (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f) ---- 1: QUERY PLAN =3D " Join Filter: (("inner".cover)::text =3D ("outer".c= over)::text)" (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f) ---- 1: QUERY PLAN =3D " -> Index Scan using idx_cover_ftn_ on c_cover_ftn= (cost=3D0.00..9.30 rows=3D2 width=3D86)" (typeid =3D 25, len =3D -1, t= ypmod =3D -1, byval =3D f) ---- 1: QUERY PLAN =3D " Index Cond: (username =3D 'user1'::name)"= (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f) ---- 1: QUERY PLAN =3D " -> Materialize (cost=3D10.99..11.89 rows=3D90 wi= dth=3D842)" (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f) ---- 1: QUERY PLAN =3D " -> Seq Scan on books (cost=3D0.00..10.9= 0 rows=3D90 width=3D842)" (typeid =3D 25, len =3D -1, typmod =3D -1, byv= al =3D f) ---- Thanks, Ehab _________________________________________________________________ Your smile counts. The more smiles you share, the more we donate.=A0 Join i= n. www.windowslive.com/smile?ocid=3DTXT_TAGLM_Wave2_oprsmilewlhmtagline= --_cc0d1424-d982-4f70-94ca-dcc012f80a63_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Greetings,

I was wondering why do we need = the Materialize node in the plan below when i explain a query?


= 1: QUERY PLAN =3D "Nested Loop  (cost=3D10.99..24.34 rows=3D1 width=3D= 846)"    (typeid =3D 25, len =3D -1, typmod =3D -1, byval = =3D f)
----
1: QUERY PLAN =3D "      Join Fi= lter: (("inner".cover)::text =3D ("outer".cover)::text)"    = (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f)
----
1: QUERY= PLAN =3D "      ->  Index Scan using idx_= cover_ftn_ on c_cover_ftn  (cost=3D0.00..9.30 rows=3D2 width=3D86)"&nb= sp;   (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f)
= ----
1: QUERY PLAN =3D "        =        Index Cond: (username =3D 'user1'::nam= e)"    (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D = f)
----
1: QUERY PLAN =3D "      -> = Materialize  (cost=3D10.99..11.89 rows=3D90 width=3D842)"  =  (typeid =3D 25, len =3D -1, typmod =3D -1, byval =3D f)
----
1= : QUERY PLAN =3D "           &= nbsp;   ->  Seq Scan on books  (cost=3D0.00..10.90 r= ows=3D90 width=3D842)"    (typeid =3D 25, len =3D -1, typmod= =3D -1, byval =3D f)
----


Thanks,
Ehab


You= r smile counts. The more smiles you share, the more we donate. Join in! = --_cc0d1424-d982-4f70-94ca-dcc012f80a63_--