Re: Postgresql is very slow - Mailing list pgsql-performance

From tv@fuzzy.cz
Subject Re: Postgresql is very slow
Date
Msg-id 20229.217.77.161.17.1214229014.squirrel@sq.gransy.com
Whole thread Raw
In response to Postgresql is very slow  (bijayant kumar <bijayant4u@yahoo.com>)
Responses Re: Postgresql is very slow
List pgsql-performance
Hi,

> Hello to list,
>
> We have a CentOS-5 server with postgresql-8.1.8 installed. I am struggling
> with postgresql performance. Any query say select * from tablename takes
> 10-15 mins to give the output, and while executing the query system loads
> goes up like anything. After the query output, system loads starts
> decresing.

I doubt the 'select * from tablename' is a good candidate for tuning, but
give us more information about the table. What is it's size - how many
rows does it have and how much space does it occupy on the disk? What is a
typical usage of the table - is it modified (update / delete) frequently?
How is it maintained - is there a autovacuum running, or did you set a
routine vacuum (and analyze) job to maintain the database?

I guess one of the servers (the slow one) is running for a long time
without a proper db maintenance (vacuum / analyze) and you dumped / loaded
the db onto a new server. So the 'new server' has much more 'compact'
tables and thus gives the responses much faster. And this holds for more
complicated queries (with indexes etc) too.

An output from 'EXPLAIN' (or 'EXPLAIN ANALYZE') command would give a much
better overview.

Tomas


pgsql-performance by date:

Previous
From: Jeremy Harris
Date:
Subject: Re: Postgresql is very slow
Next
From: "Gregory S. Youngblood"
Date:
Subject: Re: Postgresql is very slow