Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7QFpjf86789 for ; Sun, 26 Aug 2001 11:51:45 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f7QFpOK18625; Sun, 26 Aug 2001 11:51:24 -0400 (EDT) To: Meszaros Attila cc: pgsql-sql@postgresql.org Subject: Re: "AND", "OR" and Materialize :(((( In-reply-to: References: Comments: In-reply-to Meszaros Attila message dated "Sun, 26 Aug 2001 14:38:10 +0200" Date: Sun, 26 Aug 2001 11:51:23 -0400 Message-ID: <18622.998841083@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200108/317 X-Sequence-Number: 4563 Meszaros Attila writes: > WHY SHALL IT MATERIALIZE A CONSTANT RESULT IN A LOOP OF 120000 TIMES ?? > [it would be enough to materialize only once, Which in fact is exactly what the materialize node is for. The reported costs are pretty bogus, but AFAICT the plan is the right thing. regards, tom lane