Newsgroups: comp.databases
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!linus!linus!smiley!wolcott
From: wolcott@smiley.uucp (Dawn Wolcott)
Subject: Re: Paradox 3.5 - Record size calculation?
Message-ID: <1991Jun13.180915.23825@linus.mitre.org>
Sender: news@linus.mitre.org (News Service)
Nntp-Posting-Host: smiley.mitre.org
Organization: The MITRE Corporation, McLean, VA
References: <DC55B128A000242E@NAUVAX.UCC.NAU.EDU>
Date: Thu, 13 Jun 1991 18:09:15 GMT

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.

