Re: Performance on writable views - Mailing list pgsql-performance

From Joshua D. Drake
Subject Re: Performance on writable views
Date
Msg-id 46BDC091.4090109@commandprompt.com
Whole thread Raw
In response to Re: Performance on writable views  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Performance on writable views  (Jim Nasby <decibel@decibel.org>)
List pgsql-performance
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Heikki Linnakangas wrote:
> 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.

>> 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.

I don't know about that, at least when using rules for partitioning the
impact can be significant in comparison to triggers.

It may make sense for him to push this stuff to stored procs instead.

Joshua D. Drake



- --

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
            UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGvcCRATb/zqfZUUQRAqngAKCKZG1LkeBd6/Qyghv/GzPBp4qCGACfS1Ar
tXJSi/ynIQlAkATIv2yKd7M=
=lYbI
-----END PGP SIGNATURE-----

pgsql-performance by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Performance on writable views
Next
From: "Kevin Grittner"
Date:
Subject: Re: select count(*) performance