X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C1E3A9FA163 for ; Fri, 30 Jun 2006 10:23:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63978-01 for ; Fri, 30 Jun 2006 10:23:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by postgresql.org (Postfix) with ESMTP id 5CB969FA5E9 for ; Fri, 30 Jun 2006 10:23:44 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 07EC117E37; Fri, 30 Jun 2006 15:23:43 +0200 (CEST) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17647-01-3; Fri, 30 Jun 2006 15:23:42 +0200 (CEST) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id E244F17D8F; Fri, 30 Jun 2006 15:23:42 +0200 (CEST) Subject: Re: Views and query planner From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: Michael Glaesemann Cc: pgsql-sql@postgresql.org In-Reply-To: <2D1768EE-58E1-4260-A940-3ED78D560EAB@seespotcode.net> References: <1151670948.27032.5.camel@localhost.localdomain> <2D1768EE-58E1-4260-A940-3ED78D560EAB@seespotcode.net> Content-Type: text/plain Organization: Mob-Art Date: Fri, 30 Jun 2006 15:23:42 +0200 Message-Id: <1151673822.27032.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/333 X-Sequence-Number: 25569 On Fri, 2006-06-30 at 21:47 +0900, Michael Glaesemann wrote: > On Jun 30, 2006, at 21:35 , Mario Splivalo wrote: > > > Is postgres going to make one query plan, or each view has it own > > query > > plan? > > Have you taken a look at the EXPLAIN ANALYZE output of the queries? > You can see exactly which plan PostgreSQL will use. > So, the performance will be the same if I use view on view, or I create big select with those view definitions. Mario -- Mario Splivalo Mob-Art mario.splivalo@mobart.hr "I can do it quick, I can do it cheap, I can do it well. Pick any two."