home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / TEXT / PDX_ALL.ZIP / TI334.ASC < prev    next >
Text File  |  1992-02-05  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT  :  Paradox                                NUMBER  :  334
  10.   VERSION  :  1.0 & up
  11.        OS  :  DOS
  12.      DATE  :  February 5, 1992                         PAGE  :  1/2
  13.     TITLE  :  Paradox Table Growth
  14.  
  15.  
  16.  
  17.  
  18.   Paradox stores records in fixed blocks of 1K, 2K, 3K or 4K.  To
  19.   calculate record size, use the following figures:
  20.  
  21.   Numeric and dollar fields       8 bytes per record each field
  22.   Date fields                     4 bytes per record each field
  23.   Short integer fields            2 bytes per record each field
  24.   Alphanumeric                    1 byte per character per record
  25.                                     per each field
  26.  
  27.   Paradox automatically selects what it considers the optimum block
  28.   size for a table when it is created.  For unkeyed tables, Paradox
  29.   allocates the smallest block size that can contain a single
  30.   record.  For keyed tables, Paradox allocates the smallest block
  31.   size that can contain three records.  This is why the maximum
  32.   record size for a Paradox record drops from 4096 bytes for
  33.   unkeyed tables to 1350 bytes for keyed tables.  (1350 * 3 fits
  34.   into a 4096 block).
  35.  
  36.   For example, if a record in an unkeyed table is 100 bytes in
  37.   size, then Paradox allocates 1K block size of 1K (1024 bytes).
  38.   Paradox always uses 6 bytes for the block pointer.  This leaves
  39.   1018 bytes   (1024 - 6) in the block.  Therefore, 10 records
  40.   (10*100=1000) will fit into each block, with 2 percent unused
  41.   space.  In another example, if a record's size is 1400 bytes,
  42.   then Paradox allocates block sizes of 2K.  Since only one record
  43.   (1400 bytes) can fit into a 2K block (2048 bytes), 31 percent of
  44.   the block is unused.
  45.  
  46.   If the table is keyed and the record size is 500 bytes, Paradox
  47.   allocates a block size of 2K.  This is the smallest block that
  48.   fits three records (500*3+6=1506.)  Therefore, 6 records
  49.   (6*500+12=3012 bytes) fit into 2 blocks (2 * 2048 = 4096 bytes)
  50.   with 26.5 percent unused space.
  51.  
  52.   To calculate the amount of unused space in a block, take the
  53.   difference between the block size (1024, 2048, 3072, or 4096) and
  54.   the number of bytes that fit into the block e.g. (2048 - (3*500)
  55.   =  548).  To calculate the percentage of block space used, take
  56.   the number of bytes that fit into the block and divide it by the
  57.   block size ((3*500)/2048 = .73).
  58.  
  59.   During an edit session, Paradox reserves blocks for new records
  60.   and changes to existing records.  Therefore, growth occurs
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.   PRODUCT  :  Paradox                                NUMBER  :  334
  76.   VERSION  :  1.0 & up
  77.        OS  :  DOS
  78.      DATE  :  February 5, 1992                         PAGE  :  2/2
  79.     TITLE  :  Paradox Table Growth
  80.  
  81.  
  82.  
  83.  
  84.   whenever a change is made or new records are added.  Deletion of
  85.   one or more records does not automatically reclaim the blocks
  86.   that were reserved during the course of the session.
  87.  
  88.   Compressing Tables:
  89.  
  90.   Tables can be made to assume their optimal size with the
  91.   following methods:
  92.  
  93.       -  Use Modify/Data Entry instead of edit to add records to a
  94.          table.
  95.  
  96.       -  Compress the table with Modify | Restructure and press
  97.          <F2> "Do_It!" without making any changes.  This reclaims
  98.          any space used by deleted records.
  99.  
  100.       -  Normalize the table (see "Tips for Creating Tables" in the
  101.          Create section of the Paradox User's Manual or consult
  102.          Technical Information Sheets 124 and 127 for further
  103.          information).
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.