X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0E8B4DAA36 for ; Sat, 22 Oct 2005 19:15:49 -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 11823-07 for ; Sat, 22 Oct 2005 22:15:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D67B3DAA6C for ; Sat, 22 Oct 2005 19:15:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9MMFhhO003995; Sat, 22 Oct 2005 18:15:43 -0400 (EDT) To: Kishore B Cc: pgsql-performance@postgresql.org Subject: Re: Need help in setting optimal configuration for a huge database. In-reply-to: <42567e060510221415r2516523l4c3f9b42dee91a09@mail.gmail.com> References: <42567e060510221415r2516523l4c3f9b42dee91a09@mail.gmail.com> Comments: In-reply-to Kishore B message dated "Sun, 23 Oct 2005 02:45:25 +0530" Date: Sat, 22 Oct 2005 18:15:43 -0400 Message-ID: <3994.1130019343@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/309 X-Sequence-Number: 15077 Kishore B writes: > Even a basic query like select count(*) from bigger_table is > taking about 4 minutes to return. You do realize that "select count(*)" requires a full table scan in Postgres? It's never going to be fast. If that's not where your performance problem really is, you need to show us some of the actual problem queries. If it is, you should rethink why your application needs an exact row count. regards, tom lane