The Move Volume utility performs DB2 SELECTs from the object directory tables (OSM_OBJ_DIR) to prepare the list of objects to be moved. Depending on the current status of the table, DB2 might do a table space scan or an index scan. With large DB2 tables, it is recommended that you verify that DB2 is to use index scans to enhance the efficiency and performance of the Move Volume utility.
The object selection is not overlapped with the read from optical or tape, write to optical or tape, or directory update processes. This means that the elapsed time to complete the MOVEVOL processing consists of the time to select the objects and the time to update the object directory tables after the object movement is complete.
Recommendation: Creating these additional DB2 indexes enhances the performance for the Move Volume utility; however, these indexes can negatively affect other OSMC process. After MOVEVOL processing has completed, drop these additional indexes and rebind the modified plans.
To improve performance for the Move Volume utility, perform the following steps:
CREATE INDEX GROUPhlq.OBJDIRX4
ON GROUPhlq.OSM_OBJ_DIR
(
ODLSLOC ASC,
ODCLID ASC
)
USING VCAT cat_name
CLOSE NO
SUBPAGES 1
BUFFERPOOL BP1
PCTFREE 10;
CREATE INDEX GROUPhlq.OBJDIRX5
ON GROUPhlq.OSM_OBJ_DIR
(
ODBKLOC ASC,
ODCLID ASC
)
USING VCAT cat_name
CLOSE NO
SUBPAGES 1
BUFFERPOOL BP1
PCTFREE 10;
Where: cat_name is the name of the catalog used under DB2. OAM does not create these indexes using the UNIQUE keyword.
Because moving data from a backup volume requires access to all of the defined storage group directories, creation of the index on ODBKLOC (instead of ODLSLOC as in above example) is important for all storage groups that contain large numbers of objects (whether there are any backup objects on the volume being processed or not).
_______________________________________________________
_______________________________________________________
//STEPxx EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSIN DD *
DELETE
cat_name.DSNDBC.GROUPhlq.OBJDIRX4.I0001.A001
CLUSTER
PURGE
DELETE
cat_name.DSNDBC.GROUPhlq.OBJDIRX5.I0001.A001
CLUSTER
PURGE
SET LASTCC=0
SET MAXCC=0
DEFINE CLUSTER
(NAME(cat_name.DSNDBC.GROUPhlq.OBJDIRX4.I0001.A001)
LINEAR
SHAREOPTIONS(3 3)
VOLUMES(vol_ser)
CYLINDERS(pri_alloc sec_alloc)
UNIQUE )
DATA
(NAME(cat_name.DSNDBD.GROUPhlq.OBJDIRX4.I0001.A001))
DEFINE CLUSTER
(NAME(cat_name.DSNDBC.GROUPhlq.OBJDIRX5.I0001.A001))
LINEAR
SHAREOPTIONS(3 3)
VOLUMES(vol_ser)
CYLINDERS(pri_alloc sec_alloc)
UNIQUE )
DATA
(NAME(cat_name.DSNDBD.GROUPhlq.OBJDIRX5.I0001.A001))
/*
Where: vol_ser is the volume serial the data set should be placed on; pri_alloc, sec_alloc is the number of primary and secondary allocations for the data set; cat_name is the name of the catalog used under DB2. These indexes are not created using the UNIQUE keyword.
_______________________________________________________
_______________________________________________________
_______________________________________________________
_______________________________________________________
_______________________________________________________
See CBRISQL0 for sample job control language (JCL).