Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B97809FB28E for ; Wed, 29 Nov 2006 16:25:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 02043-02 for ; Wed, 29 Nov 2006 16:25:20 -0400 (AST) X-Greylist: delayed 00:21:20.412771 by SQLgrey-1.7.4 Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.230]) by postgresql.org (Postfix) with ESMTP id 049F69FB28D for ; Wed, 29 Nov 2006 16:25:22 -0400 (AST) Received: by nz-out-0102.google.com with SMTP id i11so1144337nzh for ; Wed, 29 Nov 2006 12:25:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=eNWutDVgik4qNeQZtWJAGZ6/cPzw+yrzI836M2VncXWjxZ8RIioA/hPBrm3bHZTXpjlfoBERuyXMs2/UhT1O9AO7o/r5H4sHe69FGz0PIwUIsymiSIoCXmOI9FuVDOWQ+sxA91Di6/3lG4k21yf4NNyGeDd+VIMiy3R7aKBGoZQ= Received: by 10.35.45.1 with SMTP id x1mr4678984pyj.1164830261080; Wed, 29 Nov 2006 11:57:41 -0800 (PST) Received: by 10.35.33.16 with HTTP; Wed, 29 Nov 2006 11:57:40 -0800 (PST) Message-ID: Date: Wed, 29 Nov 2006 19:57:40 +0000 From: "Joe Bloggs" To: pgsql-admin@postgresql.org Subject: Disk space usage MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36271_3853103.1164830260464" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/240 X-Sequence-Number: 23767 ------=_Part_36271_3853103.1164830260464 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_36271_3853103.1164830260464 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_36271_3853103.1164830260464--