Re: Disk space problem...

Поиск
Список
Период
Сортировка
От Ken Corey
Тема Re: Disk space problem...
Дата
Msg-id 01120309055004.09040@kenlinux.bithub.org
обсуждение исходный текст
Ответ на Re: Disk space problem...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
On Saturday 01 December 2001  5:20 pm, Tom Lane wrote:
> Consider TRUNCATE.
>
> I suspect if you look at the stats (see pg_class.relpages) you'll find
> that the space VACUUM fails to reclaim is in indexes.  Possibly you've
> gone overboard on adding indexes to your database; are there any that
> you don't need?

Amazing!  Once again, you've hit it on the head.

Thanks for pointing out pg_class...being able to see the sizes of things in
the database allowed me to directly see the changes in size as I played.

The indexes on the table which had all its rows removed and rebuilt was
indeed the root of the problems I was seeing.

I changed my statistics update script to drop all indexes, truncate the
table, rebuild the table, and then rebuild the indexes, and have seen
dramatically reduced size, and dramatically increased speed. (And my vacuum's
even run faster!)

I'm back down to 380MB to hold my data online, too.

Thanks, Tom!

--
Ken Corey, CTO    Atomic Interactive, Ltd.   ken.corey@atomic-interactive.com

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

Предыдущее
От: Nathan Wilson
Дата:
Сообщение: --with-python under MacOSX
Следующее
От: Burra
Дата:
Сообщение: LISTEN & NOTIFY data