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 05D719DC99C for ; Wed, 22 Feb 2006 23:52:48 -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 55585-05 for ; Wed, 22 Feb 2006 23:52:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 076579DC97F for ; Wed, 22 Feb 2006 23:52:46 -0400 (AST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1FC7X6-0005DW-00; Wed, 22 Feb 2006 22:52:48 -0500 To: "Kevin Grittner" Cc: Subject: Re: Good News re count(*) in 8.1 References: <43FC4384.EE98.0025.0@wicourts.gov> In-Reply-To: <43FC4384.EE98.0025.0@wicourts.gov> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 22 Feb 2006 22:52:48 -0500 Message-ID: <87irr6zq7j.fsf@stark.xeocode.com> Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.13 required=5 tests=[AWL=0.130] X-Spam-Score: 0.13 X-Spam-Level: X-Archive-Number: 200602/360 X-Sequence-Number: 17346 "Kevin Grittner" writes: > There have been several times that I have run a SELECT COUNT(*) on an entire > table on all central machines. On identical hardware, with identical data, > and equivalent query loads, the PostgreSQL databases have responded with a > count in 50% to 70% of the time of the commercial product, in spite of the > fact that the commercial product does a scan of a non-clustered index while > PostgreSQL scans the data pages. I take it these are fairly narrow rows? The big benefit of index-only scans come in when you're scanning extremely wide tables, often counting rows matching some indexed criteria. -- greg