X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B22549DCAA7 for ; Sun, 12 Mar 2006 16:59:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91152-01 for ; Sun, 12 Mar 2006 16:59:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 59EA89DCA9B for ; Sun, 12 Mar 2006 16:59:47 -0400 (AST) Received: (qmail 3939 invoked by uid 500); 12 Mar 2006 21:00:51 -0000 Date: Sun, 12 Mar 2006 15:00:51 -0600 From: Bruno Wolff III To: Phadnis Cc: pgsql-performance@postgresql.org Subject: Re: help needed asap.... Message-ID: <20060312210051.GA32559@wolff.to> Mail-Followup-To: Bruno Wolff III , Phadnis , pgsql-performance@postgresql.org References: <20060312114625.7463.qmail@webmail8.rediffmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060312114625.7463.qmail@webmail8.rediffmail.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.101 required=5 tests=[AWL=0.101] X-Spam-Score: 0.101 X-Spam-Level: X-Archive-Number: 200603/158 X-Sequence-Number: 17595 On Sun, Mar 12, 2006 at 11:46:25 -0000, Phadnis wrote: >   > 1 ) when i try to query for count or for any thg it takes a long time to return the result. How to avoid this Postgres doesn't cache counts, so if you are counting a lot of records, this may take a while to run. If you do a lot of counts or need them to be fast even if it slows other things down, there are some things you can do to address this. Several strategies have been repeatedly discussed in the archives.