Skip site navigation (1) Skip section navigation (2)

Re: Postgresql is very slow

From: tv(at)fuzzy(dot)cz
To: bijayant4u(at)yahoo(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgresql is very slow
Date: 2008-06-23 13:50:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

> 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.


In response to


pgsql-performance by date

Next:From: Gregory S. YoungbloodDate: 2008-06-23 16:06:31
Subject: Re: Postgresql is very slow
Previous:From: Jeremy HarrisDate: 2008-06-23 13:36:28
Subject: Re: Postgresql is very slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group