Re: [GENERAL] Why index occupy less amount of space than the table with same structure.

2010-03-29 Thread Alban Hertroys
On 29 Mar 2010, at 6:03, Tadipathri Raghu wrote: > Hi Alban, > > Thank you for the update. > > For one thing: The table holds information regarding to which transactions > each row is visible (the xid) whereas the index does not. > > What would be the each value of the xid, like 8 bytes,or

Re: [GENERAL] Why index occupy less amount of space than the table with same structure.

2010-03-28 Thread Tadipathri Raghu
Hi Alban, Thank you for the update. > For one thing: The table holds information regarding to which transactions > each row is visible (the xid) whereas the index does not. What would be the each value of the xid, like 8 bytes,or 32 bytes..which causing the table to hold what index is not and

Re: [GENERAL] Why index occupy less amount of space than the table with same structure.

2010-03-28 Thread Alban Hertroys
On 28 Mar 2010, at 10:05, Tadipathri Raghu wrote: > Hi All, ... > I like to know here is, I have created a table with one column and the index > is on one column only, so why is the space occupied differently, almost all > half of the space of the table and why not full. Could please you expl

[GENERAL] Why index occupy less amount of space than the table with same structure.

2010-03-28 Thread Tadipathri Raghu
Hi All, Here is small testing done by my end and am curious to know the reason. Please find the example given below:- postgres=# create table size_test(id int); CREATE TABLE postgres=# insert into size_test VALUES (generate_series(1,100)); INSERT 0 100 postgres=# select pg_size_pretty(pg_