Re: Estimating space required for indexes

From: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Estimating space required for indexes
Date: 2003-04-28 14:32:18
Message-ID: 200304282002.18645.shridhar_daithankar@nospam.persistent.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 28 April 2003 19:40, Tom Lane wrote:
> Assuming your "float"s were float4s, the heap tuple size is

Yes, they are.

> 28 bytes overhead + 3 * 4 bytes data = 40 bytes/row
>
> (assuming WITHOUT OIDS, no nulls, Intel-like alignment rules) while the
> index tuple size is
>
> 12 bytes overhead + 2 * 4 bytes data = 20 bytes/row

With these overheads it turns out that,

disk space for table= 8.1M*40=324MB
disk space for index=8.1M*20*1.5=243MB

On disk actually, 5.9GB is gone, as I mentioned earlier. Even we count other
overheads, the above total should not blow beyond 600-650MB, isn't it? But
that is not the case. And there are absolutely no other objects in the
database.

It is vacuumed analyze after insertions. No deletes at all so far. I really
wonder where this 10x bloat came from.

> > This data is just a small sample of things and
> > more data is coming.
>
> Better buy more disk ...

Disk is not a problem. But that does not mean I would like fill it up without
knowing what is happening..

Shridhar

--
I know it all. I just can't remember it all at once.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Graulich 2003-04-28 14:36:51 old thread: Migration from mySQL to postgreSQL
Previous Message marco 2003-04-28 14:23:17 Re: Performance problems