Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 08ADE47683C for ; Thu, 4 Jul 2002 15:58:31 -0400 (EDT) Mailbox-Line: From pgman@candle.pha.pa.us Thu Jul 4 15:58:31 2002 Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 87D644766E1 for ; Thu, 4 Jul 2002 15:50:31 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g64JoSr05151; Thu, 4 Jul 2002 15:50:28 -0400 (EDT) From: Bruce Momjian Message-Id: <200207041950.g64JoSr05151@candle.pha.pa.us> Subject: Re: views: performance implication In-Reply-To: <5.1.1.6.2.20020704114507.049a1008@pop3.norton.antivirus> To: John Moore Date: Thu, 4 Jul 2002 15:50:28 -0400 (EDT) Cc: Postgresql Admin X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.30 X-Spam-Level: X-Archive-Number: 200207/68 X-Sequence-Number: 4754 John Moore wrote: > We hope to use views as a way to give customers odbc based ad-hoc query > access to our database while enforcing security. The reason is that we do > not want to put data into separate tables by customer, but rather use a > customer ID as part of any query criteria on any table. > > So the question is: are there any negative performance implications of > doing so (other than the obvious of having more data in a table than is of > interest to the querying customer)? Back in the old days, views were a > performance no-no in Informix, so I want to be sure we aren't setting a big > trap for ourselves. Views are rewritten as rules for every query issued, so there is little performance impact except for the complexity of your view (GROUP BY, aggregates, etc.) -- Bruce Momjian | http://candle.pha.pa.us pgman@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