Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1859C2E01D9 for ; Thu, 6 Mar 2008 07:50:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 67505-04 for ; Thu, 6 Mar 2008 07:50:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id D08A12E0048 for ; Thu, 6 Mar 2008 07:50:19 -0400 (AST) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id B921B158036C; Thu, 6 Mar 2008 06:55:18 -0500 (EST) Cc: "A. Kretschmer" , "Mark Mielke" , pgsql-performance@postgresql.org Message-Id: From: Dave Cramer To: "sathiya psql" In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: count * performance issue Date: Thu, 6 Mar 2008 06:50:17 -0500 References: <20080306060829.GA21084@a-kretschmer.de> <47CF8EA6.8070503@mark.mielke.cc> <20080306063643.GB21084@a-kretschmer.de> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/110 X-Sequence-Number: 29064 On 6-Mar-08, at 1:43 AM, sathiya psql wrote: > is there any way to explicitly force the postgres to use index scan > > If you want to count all the rows in the table there is only one way to do it (without keeping track yourself with a trigger ); a seq scan. An index will not help you. The only thing that is going to help you is really fast disks, and more memory, and you should consider moving to 8.3 for all the other performance benefits. Dave