Subject: excessive storage

From: [email-masked] (maureen noonan)
Date: Mon, 17 Aug 92 12:42:04 -0700

I create the following classes:

create	ctd (loc = int4, dis = int4, tim = int4, clk_f = int2, 
	clk_s = int2, clk_m = int2, clk_h = int2, clk_d = int2, 
	clk_n = int2, clk_y = int2 , seq_num = int2, tran_id = int2)

create MAGsm1 (gammas = float8) inherits (ctd)

Which total up to 38 bytes per instance without the object_id
or the overhead.

My original input file contains 1800 instances, which i would
expect to create a MAGsm1 file on the order of 70Kb. In practice, my
MAGsm1 data file is 188Kb.

Could you tell me how much of this is data and how much is
overhead? What can I do to reduce the size of the files I 
create?

Thank you,

Maureen K. Noonan

---

From: postarch (Postgres Mailing Archive)
Date: Fri, 21 Aug 92 11:04:01 PDT

> Which total up to 38 bytes per instance without the object_id

40 bytes after alignment.

> overhead? What can I do to reduce the size of the files I 

there is roughly 60 bytes of tuple header (could be 56 if you have no
null attributes) and a small amount of overhead at the beginning of
each page (pointers to tuples that live on it).  This will vary according
to how many tuples you have on the block.

100 bytes per tuple * 1800 tuples = 180,000 bytes for the tuples.

Add the page overhead and a fragmentation factor (we can't always use
every byte on a page) and you get (roughly) the 188Kb that you are seeing
in the file.

Jeff Meredith
[email-masked]