Re: nightly vacuum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: nightly vacuum
Дата
Msg-id 6218.1221577069@sss.pgh.pa.us
обсуждение исходный текст
Ответ на nightly vacuum  ("Lee Keel" <lee_keel@trimble.com>)
Ответы Re: nightly vacuum  ("Lee Keel" <lee_keel@trimble.com>)
Список pgsql-general
"Lee Keel" <lee_keel@trimble.com> writes:
> I have 15 or so databases that I am deleting all the data in them and
> re-importing on a nightly basis.  (Long story here, but basically I
> found using the copy command was the fastest way to get the data into
> this read-only system from Sql Server 2000.)  A couple of the databases
> are small and only take about 15 minutes to copy all the data, but
> others are much larger and take 45 minutes or more.  So, I found that
> the databases run a lot faster if I perform a full vacuum on them. Duh!

Not so much "duh" as "maybe you should change your data import process".
It sounds like you're deleting old data with DELETE and then loading new.
Can you use TRUNCATE instead of DELETE?

Autovacuum won't *ever* do VACUUM FULL, and in a well-run database you
shouldn't need to do it manually either.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: client_encoding / postgresql strange behaviour
Следующее
От: "Lee Keel"
Дата:
Сообщение: Re: nightly vacuum