Re: db size

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: db size
Дата
Msg-id 20080414091212.f73eb101.wmoran@collaborativefusion.com
обсуждение исходный текст
Ответ на db size  (Adrian Moisey <adrian@careerjunction.co.za>)
Список pgsql-performance
In response to Adrian Moisey <adrian@careerjunction.co.za>:
>
> We currently have a 16CPU 32GB box running postgres 8.2.
>
> When I do a pg_dump with the following parameters "/usr/bin/pg_dump -E
> UTF8 -F c -b" I get a file of 14GB in size.
>
> But the database is 110GB in size on the disk.  Why the big difference
> in size?  Does this have anything to do with performance?

In a dump, indexes are a single command.  In the actual database, the
indexes actually contain all the data the indexes require, which can
be substantially more in size than the command to create the index.

Additionally, a running database has a certain amount of wasted space.
If you're running vacuum on a proper schedule, this won't get out of
hand.  Read this page to understand better:
http://www.postgresql.org/docs/8.1/static/maintenance.html

And lastly, I expect that the pg_dump format is able to do more aggressive
compression than the running database.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: shared_buffers performance
Следующее
От: Greg Smith
Дата:
Сообщение: Re: shared_buffers performance