pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
To: postgresql performance list <pgsql-performance@postgresql.org>
Subject: Re: Performance on writable views
Date: Sat, 11 Aug 2007 08:42:54 +0100
Message-ID: <46BD687E.1040100@enterprisedb.com> (raw)
In-Reply-To: <20070808124054.GC27936@nibiru.local>
References: <20070808124054.GC27936@nibiru.local>

Enrico Weigelt wrote:
> I'm often using writable views as interfaces to clients, so 
> they only see "virtual" objects and never have to cope with
> the actual storage, ie. to give some client an totally 
> denormalized view of certain things, containing only those 
> information required for certain kind of operations. 
> 
> This method is nice for creating easy and robust client 
> interfaces - internal schema changes are not visible to 
> the client. In situations when many, many clients - often
> coded/maintained by different people - have to access an
> database which is still under development (typical for 
> many inhouse applications), it helps to circument interface
> instabilities.
> 
> Now I've got the strange feeling that this makes updates
> slow, since it always has to run the whole view query to
> fetch an record to be updated (ie. to get OLD.*).

There is some overhead in rewriting the query, but it shouldn't be
significantly slower than issuing the statements behind the view
directly. I wouldn't worry about it, unless you have concrete evidence
that it's causing problems.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com



view thread (4+ messages)  latest in thread

Message-ID: <46BD687E.1040100@enterprisedb.com>
Permalink:  ../46BD687E.1040100@enterprisedb.com/
Also on:    postgresql.org/message-id/46BD687E.1040100@enterprisedb.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: heikki@enterprisedb.com, pgsql-performance@postgresql.org
  Subject: Re: Performance on writable views
  In-Reply-To: <46BD687E.1040100@enterprisedb.com>

* 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