From: Rod Taylor <pg@rbt.ca>
To: Greg Stark <gsstark@mit.edu>
Cc: Scott Marlowe <smarlowe@qwest.net>
Cc: Jack Kerkhof <jack.kerkhof@guest-tek.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Why does a simple query not use an obvious index?
Date: Sun, 29 Aug 2004 18:18:20 -0400
Message-ID: <1093817899.42199.63.camel@jester> (raw)
In-Reply-To: <874qmlk342.fsf@stark.xeocode.com>
References: <ENEIKKAEJOFHOIHMMOIDIEBMJCAA.jack.kerkhof@guest-tek.com>
<1093804128.5493.22.camel@localhost.localdomain>
<87fz65k5sq.fsf@stark.xeocode.com>
<1093815480.5493.29.camel@localhost.localdomain>
<874qmlk342.fsf@stark.xeocode.com>
> People expect count(*) _without a where clause_ to be cached in a single
> global variable. Postgres can't do this, but the reason has everything to do
Someone should write an approx_count('table') function that reads
reltuples from pg_class and tell them to use it in combination with
autovac.
I've yet to see someone use count(*) across a table and not round the
result themselves (approx 9 million clients).
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: pg@rbt.ca, gsstark@mit.edu, smarlowe@qwest.net, jack.kerkhof@guest-tek.com
Subject: Re: Why does a simple query not use an obvious index?
In-Reply-To: <1093817899.42199.63.camel@jester>
* 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