HP 3000 Manuals

Repacking Data Sets [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

Repacking Data Sets 

To repack a detail data set, use the REPACK SET command.  Repacking a
detail data set can improve database performance by eliminating long
delete chain counts (deleted entry gaps) and optimizing chains by
adjusting pointers.  Repacking a detail data set physically regroups the
records on disk to improve storage efficiency.  To further improve
performance, you can also change the capacity, blocking factor, and
device class of a detail data set with the REPACK SET command.

You can repack a detail data set in one of two ways:

   *   Serial repack.
   *   Chained repack.

A serial repack moves up the records to fill deleted entry gaps.  A
serial repack is faster than a chained repack.  A serial repack is useful
when you're not sure by which path to organize your repack, or when
you've just reduced capacity below the high-water mark.

A chained repack eliminates deleted entry gaps and then places the
records sequentially in the data set according to the chosen path.
Although slower than a serial repack, the data can be more quickly
accessed.  When performing a chained repack, select the path that is most
frequently accessed.  Make sure you select a valid path and that you
specify the correct search item.  Do not select a path that is either
being deleted or added (DELETE PATH or ADD PATH commands are in the
current change file) or has no key item data.

In the following example, the detail data set SALES is repacked serially.
The capacity of the data set is changed to 1500, the blocking factor is
changed to 16, and the device class is changed to DISK3.

     >repack set sales serial 1501 (16) disk3 
      REPACK SET pending for data set.

After issuing a PERFORM COMMANDS to invoke DBAPLUS, the following output
is displayed:

     PAGE 1      HEWLETT-PACKARD 30391C.02.00  TurboIMAGE/3000: DBSCHEMA
             FRI, APR 27, 1990, 10:40 AM  (C) HEWLETT-PACKARD CO. 1987

     BEGIN DATABASE ORDERS;

     PASSWORDS:
       11  CREDIT  ;
       12  AGENT   ;
     :
       NAME:     SALES    ,D(11/14,18), DISK3;              <---- device class changed 
       ENTRY:    ACCOUNT  ( CUSTOMER    (PURCH-DATE)),
                 STOCK#   (!PRODUCT                 ),
                 QUANTITY                            ,
                 PRICE                               ,
                 TAX                                 ,
                 TOTAL                               ,
                 PURCH-DATE                          ,
                 DELIV-DATE                          ;
       CAPACITY: 1501(16);                                   <---- capacity and blocking
                                                                                           factor changed 
     :
     NUMBER OF ERROR MESSAGES: 0
     ITEM NAME COUNT: 23  DATA SET COUNT: 5
     ROOT LENGTH: 1044    BUFFER LENGTH: 541 TRAILER LENGTH: 256

     ROOT FILE ORDERS CREATED.

     New database schema is saved as temporary file ORDERSSC
     Temporary file created for set SALES.                   <---- data set being repacked 
     Data set CUSTOMER     : No conversion necessary.
     Data set PRODUCT      : No conversion necessary.
     Data set SUP-MASTER   : No conversion necessary.
     Data set SALES        : 17 entries expected.
     Data set SALES        : 17 entries repacked successfully.
     Data set INVENTORY    : No conversion necessary.

     HP36386 (A.00.00) DBCHANGE  (c) COPYRIGHT Hewlett-Packard Co. 1985

     >



MPE/iX 5.0 Documentation