pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Doug McNaught <doug@mcnaught.org>
To: pgsql-performance@postgresql.org
Subject: Re: Slow select, insert, update
Date: Tue, 10 Aug 2004 16:48:01 -0400
Message-ID: <87r7qeg1oe.fsf@asmodeus.mcnaught.org> (raw)
References: <B668647A-EA24-11D8-9D1D-000A95B97268@intercellsolutions.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <87r7qeg1oe.fsf@asmodeus.mcnaught.org>
Permalink:  ../87r7qeg1oe.fsf@asmodeus.mcnaught.org/
Also on:    postgresql.org/message-id/87r7qeg1oe.fsf@asmodeus.mcnaught.org

 · 

reply

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: doug@mcnaught.org
  Subject: Re: Slow select, insert, update
  In-Reply-To: <87r7qeg1oe.fsf@asmodeus.mcnaught.org>

* 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