Re: Posrgres speed problem - Mailing list pgsql-performance

From Sven Geisler
Subject Re: Posrgres speed problem
Date
Msg-id 448D8940.4050209@aeccom.com
Whole thread Raw
In response to Posrgres speed problem  (Ruben Rubio Rey <ruben@rentalia.com>)
Responses Re: Posrgres speed problem - solved?
List pgsql-performance
Hi Ruben,

Ruben Rubio Rey schrieb:
>
> Hi,
>
> Im having a problem with postgres 8.1.3 on a Fedora Core 3 (kernel
> 2.6.9-1.667smp)
>
> I have two similar servers, one in production and another for testing
> purposes.
> Databases are equal (with a difference of some hours)
>
> In the testing server, an sql sentence takes arround 1 sec.
> In production server (low server load) takes arround 50 secs, and uses
> too much resources.
>
> Explain analyze takes too much load, i had to cancel it!
>
> Could it be a  it a bug?
> Any ideas?

How do you load the data to the testing server? (Dump, Copy, etc)
As you wrote the difference are some hours. I think you copy something.

It is possible that you production database as too much deleted tuples.
Vacuum full does only rebuild the table an not the index. You may also
run reindex on certain tables. I guess, this may the issue if you use
dump/restore to get your production copy.

Is three a huge difference in the result of this queries:
select relname,relpages,reltuples from pg_class order by relpages desc;
and
select relname,relpages,reltuples from pg_class where relname like
'%index' order by relpages desc;

Cheers Sven.

pgsql-performance by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Posrgres speed problem
Next
From: PFC
Date:
Subject: Interesting slow query