Re: Why queries takes too much time to execute?

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Why queries takes too much time to execute?
Дата
Msg-id 409F9098.20700@familyhealth.com.au
обсуждение исходный текст
Ответ на Why queries takes too much time to execute?  ("Anderson Boechat Lopes" <teouique@terra.com.br>)
Список pgsql-performance
>     Well, i have a very large database, with vary tables and very
> registers. Every day, too many operations are perfomed in that DB, with
> queries that insert, delete and update. Once a week some statistics are
> collected using vacuum analyze.

Have vacuum analyze running once an HOUR if it's very busy.  If you are
using 7.4, run the pg_autovacuum daemon that's in contrib/pg_autovacuum.

>     The problem is after a period of time (one month, i think), the
> queries takes too much time to perform. A simple update can take 10
> seconds or more to perform.

If running vacuum analyze once an hour doesn't help, try running a
vacuum full once a week or something to fix the problem.

Also, try upgrading to 7.4 which has indexes that won't suffer from bloat.

Chris


В списке pgsql-performance по дате отправления:

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Why queries takes too much time to execute?
Следующее
От: "Anderson Boechat Lopes"
Дата:
Сообщение: Re: Why queries takes too much time to execute?