Re: Slow select, insert, update - Mailing list pgsql-performance

From Doug McNaught
Subject Re: Slow select, insert, update
Date
Msg-id 87r7qeg1oe.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Slow select, insert, update  (Paul Langard <pjl@intercellsolutions.com>)
Responses Re: Slow select, insert, update
List pgsql-performance
Paul Langard <pjl@intercellsolutions.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

pgsql-performance by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: [HACKERS] fsync vs open_sync
Next
From: matt@ymogen.net
Date:
Subject: Re: Performance Bottleneck