[comp.databases] Paradox 3.5 - Record size calculation?

kji@vpnet.chi.il.us (Ken Isacson) (06/13/91)

Currently I am working on a rather large Paradox 3.5 application.  What
I need to know now is how do I calculate a record size?

I ran some tests today to try and determine how much a non-keyed table with justone field, a date field, would occupy.  From my test at about 1000 records, the
average record size is 8 bytes per record.  But at about 30,000 records, the 
average record size is about 4.something bytes per record.

My goal is to be able to tell my users how much disk space is going to
be required to able handle the number off accounts they will have on
their database.

Replies here are good, email is even better.

Thanks,
Ken

-- 
__________________________________________________________
Ken Isacson         Sysop - Board Of Trade BBS  GT 016/001
kji@vpnet.chi.il.us         (815) 753 - 0042
----------------------------------------------------------

DEVRIES@NAUVAX.UCC.NAU.EDU (Ernie DeVries) (06/13/91)

From "Paradox Programmer's Guide: PAL By Example":

Field Type             Length
A                      Width in bytes (width 1-255)
D                      4 bytes
$                      8 bytes
N                      8 bytes
S                      2 bytes

The maximum overall width of an unkeyeed table is 4000 bytes; for a keyed
table it is 1350 bytes.

Hope this helps.
+======================================================+
|     /\       Ernie DeVries   bitnet%"devries@nauvax" |
|    /  \/\    Academic/Personal Computer Services     |
| /\/    \ \/\                                         |
|  Northern Arizona University   "The Mountain Campus" |
+======================================================+

wolcott@smiley.uucp (Dawn Wolcott) (06/14/91)

Paradox also uses a flexible formula when determining the allocation
for tables.  It assigns blocks of disk space in either 1K, 2K, 3K or
4K block sizes.  It then attempts to fill the blocks with as many
records as can fit into the block.  The following are rules for
selecting block sizes.

For nonkeyed tables:  Paradox chooses the SMALLEST block size that
will hold EXACTLY 1 record.

EXAMPLE:   Record Size                Block Size Recs/Block
            800 bytes        1K              1
            500 bytes        1K              2
            3450 bytes       4K              1
            100 bytes        1K             10

For keyed tables:  Paradox chooses the SMALLEST block size that will
hold EXACTLY 3 records.

EXAMPLE:   Record Size                Block Size Recs/Block
            200 bytes        1K              5
            350 bytes        2K              5
            100 bytes        1K             10
            513 bytes        2K              3
           1350 bytes        4K              3

There are 2-3 bytes overhead per block.  Adding records to KEYED
tables; Paradox will frequently be required to open new blocks to
maintain index order when accepting new data.  A file could easily
grow quickly.  However, it is also likely that a record will have an
equal chance of finding room instead of opening up a block.  If a
table is restructured, the table will be written again from scratch. 

Refer to the previous Re: posting for record sizes.