On 1/23/07, Laurent Manchon <[EMAIL PROTECTED]> wrote:
Hi,
I have a slow response of my PostgreSQL database 7.4 using this query below
on a table with 800000 rows:
select count(*)from tbl;
PostgreSQL return result in 28 sec every time.
although MS-SQL return result in 0.02 sec every time.
My server is a DELL PowerEdge 2600 with bi-processor Xeon at 3.2 Ghz
with 3GBytes RAM
if you need a fast approximate answer (up to date as of last analyze),
you can do something like:
select reltuples from pg_class where relname = 'tbl' and relkind = 'r';
if you need a fast exact answer, you need to write a trigger.
merlin
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster