Re: Very long deletion time on a 200 GB database

Поиск
Список
Период
Сортировка
От Shaun Thomas
Тема Re: Very long deletion time on a 200 GB database
Дата
Msg-id 4F4B9AB9.6000900@peak6.com
обсуждение исходный текст
Ответ на Re: Very long deletion time on a 200 GB database  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Very long deletion time on a 200 GB database  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-performance
On 02/27/2012 08:53 AM, Andrew Dunstan wrote:

> If he has autovacuum on he could well be just fine with his proposed
> strategy. Or he could have tables partitioned by time and do the delete
> by just dropping partitions. There are numerous way he could get this to
> work.

He isn't using partitions though. That's the whole reason for this
thread. Having autovacuum turned on (which should be the case for 8.4
and above anyway) will not magically remove the old rows. VACUUM marks
rows as dead/reusable, so INSERT and UPDATE statements will take the
dead spots instead of creating new extents.

Like I said, this will stop his tables from growing further so long as
he keeps his maintenance functions running regularly from now on, but
the existing rows he's trying to delete will never go away until he runs
a CLUSTER or some other system of actually purging the dead rows.

Notice how I don't suggest using VACUUM FULL. :)

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas@peak6.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

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

Предыдущее
От: "Reuven M. Lerner"
Дата:
Сообщение: Re: Very long deletion time on a 200 GB database
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: Very long deletion time on a 200 GB database