From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: Good News re count(*) in 8.1
Date: Wed, 22 Feb 2006 12:42:02 -0500
Message-ID: <13377.1140630122@sss.pgh.pa.us> (raw)
In-Reply-To: <43FC4384.EE98.0025.0@wicourts.gov>
References: <43FC4384.EE98.0025.0@wicourts.gov>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> We are replicating data from 72 source databases, each with the
> official copy of a subset of the data, to four identical consolidated
> databases, spread to separate locations, to serve our web site and other
> organization-wide needs. Currently, two of these central databases are
> running a commercial product and two are running PostgreSQL. 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.
Interesting. I think though that the people who are complaining come
from databases where COUNT(*) takes constant time because the DB keeps
a running count in the table's metadata.
regards, tom lane
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: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov
Subject: Re: Good News re count(*) in 8.1
In-Reply-To: <13377.1140630122@sss.pgh.pa.us>
* 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