Re: Estimating space required for indexes - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Estimating space required for indexes
Date
Msg-id 200304282002.18645.shridhar_daithankar@nospam.persistent.co.in
Whole thread Raw
In response to Re: Estimating space required for indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Estimating space required for indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-general by date:

Previous
From: marco
Date:
Subject: Re: Performance problems
Next
From: Ralph Graulich
Date:
Subject: old thread: Migration from mySQL to postgreSQL