Re: Disk space usage

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Joe Bloggs <polonium210(at)googlemail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Disk space usage
Date: 2006-11-29 20:46:32
Message-ID: 1164833192.14565.221.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 2006-11-29 at 13:57, Joe Bloggs wrote:
> I created a table in 8.1.5 on Linux with three columns;
>
> date, bigint and integer.
>
> Then I populated the table with more than 2 million rows.
>
> I looked at the size of the file that contained the table and divided
> this by the number of rows which gave an average of just over 60 bytes
> per row.
>
> This seems to be quite a large overhead as I would guess that the date
> field takes around 4 bytes, the bigint 8 bytes and the integer 4
> bytes. I would have hoped to have had an average size of between 20
> and 30 bytes per row. Is this normal and is there any way of improving
> this as I'm hoping to use have around 80 million rows in a table
> without it taking up too much disk space and too much memory to cache
> it?

Had you done any updates to the tables? If so, had you run a vacuum
full?

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John Allgood 2006-11-29 20:51:42 Out of file-descriptors message
Previous Message Joe Bloggs 2006-11-29 19:57:40 Disk space usage