Re: table size is bigger than expected

Поиск
Список
Период
Сортировка
От Justin Pitts
Тема Re: table size is bigger than expected
Дата
Msg-id CAMYZu8U0k2DhAazY0xKhfjpCB-DkYgpD6cJy57e_dnaZwxCiTg@mail.gmail.com
обсуждение исходный текст
Ответ на table size is bigger than expected  (Jian Shi <jshi@unitrends.com>)
Список pgsql-performance
On Thu, Aug 4, 2011 at 2:56 PM, Jian Shi <jshi@unitrends.com> wrote:
> Hey,
>
>   I’m a new user of PostgreSQL. I found one of my tables is taking
> unexpectedly large space:
>
> select
> pg_size_pretty(pg_relation_size('archive_files'));
>
>  pg_size_pretty
>
> ----------------
>
> 1113 MB
>
>
> the field “fname” stores file names without any directory names. In our
> case, each record is expected to take around 300 bytes.
>
> However, this table contains 934829 records, which means each record takes
> about 1.2KB.
>
what does this query yield?

select pg_size_pretty(sum(length(fname))) from archive_files;

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

Предыдущее
От: Robert Ayrapetyan
Дата:
Сообщение: Re: Performance die when COPYing to table with bigint PK
Следующее
От: Robert Ayrapetyan
Дата:
Сообщение: Re: Performance die when COPYing to table with bigint PK