Skip site navigation (1) Skip section navigation (2)

Re: Performance on writable views

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>, postgresql performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance on writable views
Date: 2007-08-11 07:42:54
Message-ID: 46BD687E.1040100@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-sql
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

In response to

Responses

pgsql-performance by date

Next:From: Joshua D. DrakeDate: 2007-08-11 13:58:41
Subject: Re: Performance on writable views
Previous:From: Joshua D. DrakeDate: 2007-08-10 21:50:34
Subject: Re: How to ENABLE SQL capturing???

pgsql-sql by date

Next:From: Javier Fonseca V.Date: 2007-08-11 07:43:30
Subject: Trigger Procedure Error: NEW used in query that is not in a rule
Previous:From: Rodrigo De LeónDate: 2007-08-11 01:13:46
Subject: Re: Best Fit SQL query statement

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group