Re: Posrgres speed problem

Поиск
Список
Период
Сортировка
От Sven Geisler
Тема Re: Posrgres speed problem
Дата
Msg-id 448D8940.4050209@aeccom.com
обсуждение исходный текст
Ответ на Posrgres speed problem  (Ruben Rubio Rey <ruben@rentalia.com>)
Ответы Re: Posrgres speed problem - solved?
Список 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 по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Posrgres speed problem
Следующее
От: PFC
Дата:
Сообщение: Interesting slow query