X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4702AD1B486 for ; Mon, 12 Apr 2004 16:52:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 55203-01 for ; Mon, 12 Apr 2004 16:52:13 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id D5836D1D1B8 for ; Mon, 12 Apr 2004 16:52:10 -0300 (ADT) Received: (qmail 24169 invoked by uid 500); 12 Apr 2004 19:55:52 -0000 Date: Mon, 12 Apr 2004 14:55:52 -0500 From: Bruno Wolff III To: Jeremy Dunn Cc: 'Postgresql Performance' Subject: Re: index v. seqscan for certain values Message-ID: <20040412195552.GA24133@wolff.to> Mail-Followup-To: Jeremy Dunn , 'Postgresql Performance' References: <12037.1081792288@sss.pgh.pa.us> <001d01c420c1$0ed23290$4f01a8c0@jeremydunn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001d01c420c1$0ed23290$4f01a8c0@jeremydunn> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/140 X-Sequence-Number: 6440 On Mon, Apr 12, 2004 at 15:05:02 -0400, Jeremy Dunn wrote: > > Agreed. However, given that count(*) is a question that can be answered > _solely_ using the index (without reference to the actual data blocks), > I'd expect that the break-even point would be considerably higher than > the < 3% (~38,000 / ~1.3M) I'm currently getting. Does PG not use > solely the index in this situation?? That isn't true. In order to check visibility you need to look at the data blocks.