Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ED356476F78 for ; Wed, 22 Jan 2003 12:53:24 -0500 (EST) Received: from smtp017.mail.yahoo.com (smtp017.mail.yahoo.com [216.136.174.114]) by postgresql.org (Postfix) with SMTP id 2A0DA476396 for ; Wed, 22 Jan 2003 12:32:22 -0500 (EST) Received: from psc.progress.com (HELO Yahoo.com) (janwieck@192.233.92.200 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 22 Jan 2003 17:32:27 -0000 Message-ID: <3E2ED547.DF9F68D4@Yahoo.com> Date: Wed, 22 Jan 2003 12:30:47 -0500 From: Jan Wieck Organization: Home X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,ru MIME-Version: 1.0 To: Tomasz Myrta Cc: Ries van Twisk , pgsql-sql@postgresql.org Subject: Re: To use a VIEW or not to use a View..... References: <002001c2c228$bc3d2780$f100000a@IT001> <3E2EBCEE.EF487ECC@Yahoo.com> <3E2EC4E9.7000809@klaster.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/341 X-Sequence-Number: 11206 Tomasz Myrta wrote: > > Jan Wieck wrote: > > >Use tables, views and views over views, it's all fine and your indexes > >will be used. > > I can't agree with using views over views. It has some limitations. > I asked about it on this list several months ago > and Tom Lane's conclusion was: It has less to do with the nesting level of rewriting, than with what you do with the view in general. If you cram up all the functionality with aggregating subselects into one monster view it might do better, except for maintaining the code. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #