pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: Good News re count(*) in 8.1
Date: 22 Feb 2006 22:52:48 -0500
Message-ID: <87irr6zq7j.fsf@stark.xeocode.com> (raw)
In-Reply-To: <43FC4384.EE98.0025.0@wicourts.gov>
References: <43FC4384.EE98.0025.0@wicourts.gov>


"Kevin Grittner" <Kevin.Grittner@wicourts.gov> 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




view thread (6+ messages)  latest in thread

Message-ID: <87irr6zq7j.fsf@stark.xeocode.com>
Permalink:  ../87irr6zq7j.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87irr6zq7j.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, Kevin.Grittner@wicourts.gov
  Subject: Re: Good News re count(*) in 8.1
  In-Reply-To: <87irr6zq7j.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox