Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 818819FB27D for ; Tue, 6 Mar 2007 11:20:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 18785-02-3 for ; Tue, 6 Mar 2007 11:20:41 -0400 (AST) X-Greylist: delayed 00:29:59.605564 by SQLgrey-1.7.4 Received: from rootabega.88thstreet.com (dsl254-071-237.nyc1.dsl.speakeasy.net [216.254.71.237]) by postgresql.org (Postfix) with ESMTP id D291B9FB2E5 for ; Tue, 6 Mar 2007 11:20:15 -0400 (AST) Received: from www.88thstreet.com (localhost [IPv6:::1]) by rootabega.88thstreet.com (8.13.3/8.13.3) with ESMTP id l26EeqI3017602 for ; Tue, 6 Mar 2007 09:40:52 -0500 (EST) Received: from 63.118.86.10 (SquirrelMail authenticated user radhika) by www.88thstreet.com with HTTP; Tue, 6 Mar 2007 09:40:52 -0500 (EST) Message-ID: <14956.63.118.86.10.1173192052.squirrel@www.88thstreet.com> Date: Tue, 6 Mar 2007 09:40:52 -0500 (EST) Subject: [Fwd: View Vs. Table] From: "Radhika Sambamurti" To: pgsql-sql@postgresql.org Reply-To: radhika@88thstreet.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200703/44 X-Sequence-Number: 27682 Hi, I have two tables which currently are being aggregated into a third table. I am proposing eliminating or drastically shortening the 3rd aggregation table, and instead just using a View. Which brings me to the question, which is better? Reading from a table or a view or is there a difference in performance? From the application's perspective the View is much better as data is being stored in one place, reducing errors and also storage. But from the db point of view, is there a bigger performace hit when I query a view Vs a table or is there no difference. Thanks, Radhika -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall --- -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall ---