Re: Vacuum wait time problem

Поиск
Список
Период
Сортировка
От Tino Schwarze
Тема Re: Vacuum wait time problem
Дата
Msg-id 20090213223453.GH12562@easy2.in-chemnitz.de
обсуждение исходный текст
Ответ на Re: Vacuum wait time problem  (Scott Marlowe <scott.marlowe@gmail.com>)
Ответы Re: Vacuum wait time problem
Список pgsql-admin
On Fri, Feb 13, 2009 at 03:13:28PM -0700, Scott Marlowe wrote:

[...]

> Yeah, that's pretty bad.  ~2 Million live rows and ~18 Million dead
> ones is a pretty badly bloated table.
>
> Vacuum full is one way to reclaim that lost space.  You can also dump
> and restore that one table, inside a drop / create restraints in a
> transaction during maintenance if you can.  A Vacuum full is quite
> intrusive, so avoid it during normal working hours.  Dumping and
> reloading the whole db may be faster than either a vacuum full or a
> cluster.    A common trick is to do something like:
>
> begin;
> select * into ordermydata from bigbloatedtable order by some_field;
> delete * from bigbloatedtable;
> insert into bigbloatedtable select * from ordermydata;
> commit;
>
> This will both put your table in some order which might help, and
> remove the bloat.

Really? Wouldn't that add even more bloat? How does that work? (I'd
expect a drop table/create table instead of the delete...)
Note: I suppose that you know a lot more about PG than I do, so I'm just
curious.

Thanks,

Tino.

--
"What we nourish flourishes." - "Was wir nähren erblüht."

www.lichtkreis-chemnitz.de
www.craniosacralzentrum.de

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

Предыдущее
От: Tino Schwarze
Дата:
Сообщение: Re: Vacuum wait time problem
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Vacuum wait time problem