X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 67DEB52881 for ; Tue, 21 Jun 2005 11:01:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08162-04 for ; Tue, 21 Jun 2005 14:01:26 +0000 (GMT) Received: from mail-relay1.tagaudit.com (unknown [69.64.214.4]) by svr1.postgresql.org (Postfix) with ESMTP id 09644528D0 for ; Tue, 21 Jun 2005 11:01:25 -0300 (ADT) Received: from mail-hub.tagaudit.com (dns2.tagaudit.com [192.168.3.32]) by mail-relay1.tagaudit.com (Postfix) with ESMTP id 65D08200000FB for ; Tue, 21 Jun 2005 10:01:29 -0400 (EDT) Received: by mail-hub.tagaudit.com (Postfix, from userid 8) id 5B43321FEF; Tue, 21 Jun 2005 10:01:29 -0400 (EDT) Received: from xeon400.tagaudit.com (xeon400.tagaudit.com [192.168.3.17]) by mail-hub.tagaudit.com (Postfix) with ESMTP id DFBDA21FF1 for ; Tue, 21 Jun 2005 10:01:28 -0400 (EDT) Received: by vpn.tagaudit.com with Internet Mail Service (5.5.2656.59) id ; Tue, 21 Jun 2005 10:01:28 -0400 Message-ID: <0C072E7CC947D511AC9600A0CC7341200256CF51@vpn.tagaudit.com> From: Amit V Shah To: "'pgsql-performance@postgresql.org'" Subject: Do Views execute underlying query everytime ?? Date: Tue, 21 Jun 2005 10:01:21 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.35 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200506/375 X-Sequence-Number: 13012 Hi all, I have like a repository table with is very very huge with atleast a few hundreds of millions, may be over that. The information is stored in form of rows in these tables. I need to make that information wide based on some grouping and display them as columns on the screen. I am thinking of having a solution where I create views for each screen, which are just read only. However, I donot know if the query that creates the view is executed everytime I select something from the view. Because if that is the case, then I think my queries will again be slow. But if that is the way views work, then what would be the point in creating them .. Any suggestions, helps -- (Please pardon if this question should not be on performance forum) Thanks, Amit