Re: VACUUM and ANALYZE Follow-Up

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: VACUUM and ANALYZE Follow-Up
Дата
Msg-id 20041129230925.GC30997@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: VACUUM and ANALYZE Follow-Up  ("Mark Dexter" <MDEXTER@dexterchaney.com>)
Список pgsql-general
On Mon, Nov 29, 2004 at 02:57:28PM -0800, Mark Dexter wrote:

> 1. Why run VACUUM on an empty table?

Another approach: you run VACUUM on an empty table to empty it.  If you
had a table with a lot of tuples, and ran DELETE on it, it will empty
after that, but it will be full of dead tuples.  So you have to VACUUM
it to reclaim space.

Of course it would be better to use TRUNCATE rather than DELETE, but
that doesn't always work (e.g. because the table has foreign keys).

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"This is a foot just waiting to be shot"                (Andrew Dunstan)

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

Предыдущее
От: "Mark Dexter"
Дата:
Сообщение: Re: VACUUM and ANALYZE Follow-Up
Следующее
От: Mage
Дата:
Сообщение: Re: VACUUM and ANALYZE Follow-Up