Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA51084 for ; Thu, 5 Aug 1999 22:35:00 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA21522; Thu, 5 Aug 1999 22:33:32 -0400 (EDT) From: Bruce Momjian Message-Id: <199908060233.WAA21522@candle.pha.pa.us> Subject: Re: [SQL] qurey plan and indices In-Reply-To: <37AA43C4.5DDBE65F@krs.ru> from Vadim Mikheev at "Aug 6, 1999 10:09:08 am" To: Vadim Mikheev Date: Thu, 5 Aug 1999 22:33:32 -0400 (EDT) CC: Tom Lane , Patrick Giagnocavo , pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Not in all cases. First, to use InitPlan you would have to add > DISTINCT to subquery to avoid duplicates. Second, there is another > way of optimization - cache/hash subquery results to avoid > re-execution of subquery plan. Planner should make decision what > way to follow. Yep, that's what I was looking for. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026