Re: Slow select, insert, update

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow select, insert, update
Date: 2004-08-10 20:48:01
Message-ID: 87r7qeg1oe.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Paul Langard <pjl(at)intercellsolutions(dot)com> writes:

> Having trouble with one table (see time to count records below!).
>
> Fairly new to postgres so any help much appreciated.
>
> It only contains 9,106 records - as you can see from:
>
>
> select count(id) from project
>
> count
> 9106
> 1 row(s)
> Total runtime: 45,778.813 ms

> ... the database is regularly vaccuumed.

Hmm. You might try a VACUUM FULL and a REINDEX on the table (you
don't say what version you are running--REINDEX is sometimes needed on
7.3 and below).

Also, use EXPLAIN ANALYZE on your query and post the result--that's
helpful diagnostic information.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Litao Wu 2004-08-10 21:44:00 Re: Slow select, insert, update
Previous Message matt 2004-08-10 20:04:56 Re: Performance Bottleneck