db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Space requirements on disk
Date Tue, 11 Oct 2011 01:50:06 GMT
> Is it possible to give rules of the following kind:
> Every field of type INTEGER will take N bytes (N=4?),
> every field of type VARCHAR(X) will take I*X+J bytes (I, J =?),
> every field of type VARCHAR with NULL value will take K bytes,
> every row will take the sum of all field-widths plus L bytes,

I think it *is* possible, but I'm not aware of anyone who has done this.

When I was faced with practical problems of this sort (how much space
will my database take up, if I design the tables like this?), my approach
was to prototype the tables, load up a "reasonable" amount of data
(at least a few hundred thousand rows, maybe a million rows), and
look to see how much actual space got used.

The Derby "SPACE_TABLE" tool is quite useful for running experiments like this.




View raw message