From: Joe Bloggs <polonium210@googlemail.com>
To: pgsql-admin@postgresql.org
Subject: Disk space usage
Date: Wed, 29 Nov 2006 19:57:40 +0000
Message-ID: <b07e99670611291157y3f65598akc27c88949a13e2e2@mail.gmail.com> (raw)
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?
Regards
Joe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: polonium210@googlemail.com
Subject: Re: Disk space usage
In-Reply-To: <b07e99670611291157y3f65598akc27c88949a13e2e2@mail.gmail.com>
References: <b07e99670611291157y3f65598akc27c88949a13e2e2@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox