How sparse indexing suppresses index entries

When a source segment is loaded, inserted, or replaced in the database, DL/I automatically creates or maintains the pointer segment in the index. This happens automatically unless you have specified that you do not need certain pointer segments built.

For example, suppose you have a secondary index for an education database. STUDENT is the source segment, and COURSE is the target segment. You might need to create pointer segments for students only if they are associated with a certain customer number. This could be done using sparse indexing, a performance enhancement of secondary indexing.

HALDB partitioned secondary indexes (PSINDEXes) support sparse indexing; however, the sparse indexing of the segments in a PSINDEX does not reduce the number of indirect list entries (ILEs) in the indirect list data set (ILDS) that manages pointers between the indexed database and the PSINDEX. The number of ILEs in an ILDS matches the number of target segments in the indexed database rather than the number of segments in the PSINDEX.

Advantages of sparse indexing

Sparse indexing allows you to specify the conditions under which a pointer segment is suppressed, not generated, and put in the index database. Sparse indexing has two advantages. The primary one is that it reduces the size of the index, saving space and decreasing maintenance of the index. By decreasing the size of the index, performance is improved. The second advantage is that you do not need to generate unnecessary index entries.

Suppressing index maintenance for BMP regions

When a DEDB database has secondary index defined, IMS™ automatically performs index maintenance when the source statement is inserted, updated, or deleted. The index suppression option provides the capability for updating a DEDB database with one or more secondary index defined without index maintenance. If an application has many updates to the primary DEDB database that would result in significant index maintenance to its associated secondary index database, you can suppress the index maintenance for the application. Then synchronize your primary DEDB database and its secondary index databases at a later time using an in-house application or vendor tool product.

To suppress index maintenance, specify the //DFSCTL DD statement in the JCL of the IMS BMP region.
 //DFSCTL  DD  *
SETI PSB=psbname 

The SETI PSB=psbname parameter suppresses index maintenance for any DEDB database with secondary index defined for the BMP application for PSB of psbname.

If psbname in the PSB=psbname parameter in the SETI statement does not match the PSB name for the BMP application, or the PSB= parameter is not specified in the SETI statement, message DFS0510E is issued and the application is terminated with an ABENDU1060. You will need to correct the SETI statement and rerun the BMP application.