Raw size

Поиск
Список
Период
Сортировка
От Ioannis Theoharis
Тема Raw size
Дата
Msg-id Pine.GSO.4.58.0503101956100.17880@ourania.ics.forth.gr
обсуждение исходный текст
Ответы Re: Raw size  (Jaime Casanova <systemguards@gmail.com>)
Re: Raw size  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Raw size  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers

Hi,

i have a table:

create table triples(att0 varchar(1000),att1 int4,att2 varchar(20),att3 varchar(1000)
)

My table has 990 raws.

The (possibly wrong) way, with wich i compute the size of the table is:
att0: 1000 * 1 Byte + 4 = 1004 Bytes
att2: 20 * 1 Byte + 4 = 24 Bytes
att3: 1000 * 1 Byte + 4 = 1004

2032 Bytes + 40 (for oid) = 2072 Bytes

990 * 2072 = 2,051,280 Bytes

BUT after clustering triples according to an index on att1:



select relname, relpages from pg_class ;            relname             | relpages
---------------------------------+----------triples                         |      142  (8KB/buffer)

142 * 8 * 1024 = 1,163,264 Bytes


Is there any compression or what?



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: We are not following the spec for HAVING without GROUP BY
Следующее
От: "Bort, Paul"
Дата:
Сообщение: Re: We are not following the spec for HAVING without GR