Re: table and index size

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: table and index size
Дата
Msg-id 15269.1026737683@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: table and index size  (Curt Sampson <cjs@cynic.net>)
Список pgsql-general
Curt Sampson <cjs@cynic.net> writes:
> On Mon, 15 Jul 2002, Damon Fasching wrote:
>> Is there a way to determine the size of a table? an index?

> The pg_class table has the size of every object in (usually 8K) pages. So:

>     SELECT relname, reltype, relpages, relpages / 128 AS MB
>     FROM pg_class
>     WHERE relname LIKE 'session%'

Note that those numbers are only up to date if you've vacuumed recently.

>> I created a table with two int4 columns and inserted 100 K rows.  The
>> change in disk usage was only 4.3 KBytes, or .17 bits per integer.

> Something's wrong there. Did you sync? 430 KB I'd believe.

I'd believe 4300 KB, but not anything much less than that.
I doubt sync has anything to do with it; I'd wonder whether he
was du'ing the right place with the right privileges.  $PGDATA is
normally not readable by anyone except the postgres user...

            regards, tom lane

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

Предыдущее
От: Steve Brett
Дата:
Сообщение: Re: help (maybe i'm a little stupid)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: okay so i deleted pg_log .....