Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 2C5659F97A5; Sat, 11 Aug 2007 10:57:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 24227-08; Sat, 11 Aug 2007 10:57:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 9C3A79F9723; Sat, 11 Aug 2007 10:56:34 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l7BDuVCG021636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Aug 2007 06:56:32 -0700 Message-ID: <46BDC091.4090109@commandprompt.com> Date: Sat, 11 Aug 2007 06:58:41 -0700 From: "Joshua D. Drake" User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-sql , postgresql performance list Subject: Re: Performance on writable views References: <20070808124054.GC27936@nibiru.local> <46BD687E.1040100@enterprisedb.com> In-Reply-To: <46BD687E.1040100@enterprisedb.com> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.1/3909/Fri Aug 10 08:10:24 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Sat, 11 Aug 2007 06:56:32 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/122 X-Sequence-Number: 26252 -----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-----