Skip site navigation (1) Skip section navigation (2)

Re: Why does a simple query not use an obvious index?

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Scott Marlowe <smarlowe(at)qwest(dot)net>,Jack Kerkhof <jack(dot)kerkhof(at)guest-tek(dot)com>,Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Why does a simple query not use an obvious index?
Date: 2004-08-29 22:18:20
Message-ID: 1093817899.42199.63.camel@jester (view raw or flat)
Thread:
Lists: pgsql-performance
> 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).



In response to

pgsql-performance by date

Next:From: Russell SmithDate: 2004-08-29 22:31:30
Subject: Re: Query performance problem in 8.0.0beta1
Previous:From: Greg StarkDate: 2004-08-29 22:10:05
Subject: Re: Why does a simple query not use an obvious index?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group