Partitioning the 4 KB object storage tables

During OAM installation and customization (using the default SAMPLIB members provided with the product), OAM creates a nonpartitioned unique clustered index on the 4 KB object storage table using a composite key consisting of both:
You might change the DB2 table space containing the 4 KB object storage table into a partitioned table space. If you do so, decide which column or columns on the 4 KB object storage table to use for the partitioning key. The following two examples of columns in the 4 KB object storage table might be used for the partitioning key:

OAM does not update the value of the collection ID column (OTCLID) in a row in the 4 KB object storage table, so this column might be used in a partitioning key. OAM does not update the value of the object name column (OTNAME) in a row in the 4 KB object storage table, so this column might be used in a partitioning key. If you use the object name column (OTNAME) as the partitioning key, remember that DB2 only uses the first 40 bytes of the partitioning key to actually partition the data.

Another option to partition the 4 KB table is by adding a column that you use only as the partitioning key.

  1. Determine the data type of the column and the value to be inserted into the column.

    _______________________________________________________

  2. Alter the 32 KB table to add this column before the OTOBJ column.
    • For example, one option could be to make this column a timestamp that is set when a row is inserted into the table when the object is created. You would then partition the table based on the selected time periods.
    • Another option could be to make the partitioning column a partition ID. You could specify a DB2 trigger that calculates the value of the partition ID.

    _______________________________________________________

  3. If you add a new column to the 4 KB table, you must drop and recreate the views that were created at installation. To drop and recreate the views, run sample job CBRISQL0, as the following example shows:
    DROP VIEW osg_hlq.V_OSM_04K_OBJ_TBL;
    CREATE VIEW osg_hlq.V_OSM_04K_OBJ_TBL AS SELECT ALL * FROM 
    osg_hlq.OSM_04K_OBJ_TBL;
    The osg_hlq in the DROP and CREATE statements is the high-level qualifier for the object storage group for the 4 KB table.

    _______________________________________________________

To create the DB2 table space containing the 4 KB object storage table as a partitioned table space, you must modify the CREATE TABLESPACE SQL statements by adding a NUMPARTS clause for the HLQ.OSMOTS04 table spaces in the CBRISQL0 job in SYS1.SAMPLIB.

If you create the DB2 table space containing the 4 KB object storage table as a partitioned table space, you must define a partitioned index on the 4 KB object storage table. The partitioned index can be created by adding a CREATE INDEX SQL statement to the CBRISQL0 sample job in SYS1.SAMPLIB.

If you create the DB2 table space containing the 4 KB object storage table as a partitioned table space, the partitioned index must also be the clustering index. Therefore, the default index that OAM creates on the 4 KB object storage table (HLQ.OBJT04X1) cannot be a clustering index. In this case, you must change the default index that OAM creates on the 4 KB object storage table (HLQ.OBJT04X1) to a nonclustered index by removing the CLUSTER keyword from the CREATE INDEX SQL statement for the HLQ.OBJT04X1 index in the CBRISQL0 sample job in SYS1.SAMPLIB.

If you create the DB2 table space containing the 4 KB object storage table as a partitioned table space, there must still be a unique nonpartitioned index on the composite key in order for OAM to function properly that consists of both:
Note: Having a partitioned index and a nonpartitioned index on the 4 KB object storage table might diminish some of the benefits of partitioning the 4 KB object storage table.

In addition to changing the SQL statements contained in the CBRISQL0 sample jobs in SYS1.SAMPLIB, also update the CBRIALC0 job in SYS1.SAMPLIB. Include IDCAMS (access method services) DEFINE CLUSTER commands to preallocate a VSAM linear data set (LDS) for each of the partitions that you plan on having for each partitioned table space containing the 4 KB object storage table associated with each Object storage group. Also use the IDCAMS DEFINE CLUSTER command to preallocate a VSAM linear data set for each partition comprising the partitioned index that you plan to create. The data set names associated with each VSAM linear data set must conform to DB2 data set naming conventions as specified in the "Data set naming conventions" topic in the IBM Information Management Software for z/OS Solutions Information Center.

DB2 free space search algorithms are not as efficient for partitioned table spaces as they are for segmented table spaces. As a result of partitioning the DB2 table spaces that contain the OAM 4 KB object storage tables, you might impact the performance when small objects are being stored to the DB2 sublevel.

By partitioning the DB2 table space containing the OAM 4 KB object storage table, you are accepting the following responsibilities: