calculating table and index size - Mailing list pgsql-admin

From Günce Kaya
Subject calculating table and index size
Date
Msg-id CAAV2-mW_vtzDqqWbhQWZDJ+RAkzyN+wscNBOZ5t2Jqw5KCwxKA@mail.gmail.com
Whole thread Raw
Responses Re: [ADMIN] calculating table and index size  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-admin
Hi all,

I have some questions about calculating table and index size. 

I have a dummy table which has an integer column and its index. The table has 1400000 rows and all of rows are same thats value is 20000000. Table size is 50MB and index size is 31MB. Why there is too much size difference between table and its index? what happen on data files when we add index?

Second question is that after created table, table size was 0 byte. I inserted a row as 120 then table size was 8192 byte. I inserted five times same value to the table and table size is still 8192 bytes. Table size changed after inserted lots of rows. Table size was stabile till first few hundred rows. why table size didn't change when I inserted lots of rows?

Is there anyone can explain two questions?

Best regards
-- 
Gunce Kaya

pgsql-admin by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: pgsql and lxc containers input
Next
From: Guillaume Lelarge
Date:
Subject: Re: [ADMIN] calculating table and index size