Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id NAA14566 for postgres-dist; Sun, 21 Nov 1993 13:51:20 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311212151.NAA14566@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from laphroaig.aoc.NRAO.EDU (laphroaig.aoc.nrao.edu [146.88.5.19]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id NAA14557 for <postgres@nobozo.CS.Berkeley.EDU>; Sun, 21 Nov 1993 13:51:19 -0800
Received: from localhost by laphroaig.aoc.NRAO.EDU (8.6.beta.11/1.3pmg)
	id VAA16025; Sun, 21 Nov 1993 21:50:46 GMT
Message-Id: <199311212150.VAA16025@laphroaig.aoc.NRAO.EDU>
Date: Sun, 21 Nov 1993 21:50:46 GMT
From: Chris Flatters <cflatter@aoc.nrao.edu>
To: postgres@postgres.Berkeley.EDU
Subject: Re: size of data files
X-Sun-Charset: US-ASCII
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Sun, 21 Nov 93 13:51:20 -0800
Resent-XMts: smtp

Kent Archie <kca@iwtqg.Berkeley.EDU> writes:
> Is there a way to determine the amount of space actually used
> by Postgres tables. I just stored some data in my tables
> and they jumped from 0 bytes to 8192. I assume there is
> some minimum allocation regardless of the actual data stored.
> But can I find the amount due to my data?
> I am trying to compare the earlier file-based version
> of my application to the Postgres one.
> I expect the database to have higher overhead, but how much?

The POSTGRES page size is 8k bytes so the storage required for any class
is always rounded up to the next multiple of 8k.  You can make a rough
guess at the table size by multiplying the size of each tuple by the
number of tuples in the class and rounding up to a 8k multiple.  This may
give underestimate the number of 8k pages by one in a few cases since there
is a small amount of bookkeeping information stored with each page.

	Chris Flatters
	cflatter@nrao.edu
