Re: Performance on writable views

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux