pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: John Moore <postgres@tinyvital.com>
Cc: Postgresql Admin <pgsql-admin@postgresql.org>
Subject: Re: views: performance implication
Date: Thu, 4 Jul 2002 15:50:28 -0400 (EDT)
Message-ID: <200207041950.g64JoSr05151@candle.pha.pa.us> (raw)
In-Reply-To: <5.1.1.6.2.20020704114507.049a1008@pop3.norton.antivirus>

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





view thread (4+ messages)  latest in thread

Message-ID: <200207041950.g64JoSr05151@candle.pha.pa.us>
Permalink:  ../200207041950.g64JoSr05151@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200207041950.g64JoSr05151@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, postgres@tinyvital.com
  Subject: Re: views: performance implication
  In-Reply-To: <200207041950.g64JoSr05151@candle.pha.pa.us>
  References: <5.1.1.6.2.20020704114507.049a1008@pop3.norton.antivirus> <200207041950.g64JoSr05151@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox