IBM Security Directory Server, Version 6.3.1

DB2 indexes

You can use DB2® indexes to improve the performance of search operations against a directory server if the requested attributes are indexed.

When you index attributes that are frequently searched, it takes lesser time to locate the requested data. DB2 indexes improve the performance of directory operations, such as start time, subtree search of an LDAP entry, and finding all subentries of an LDAP entry. It is beneficial from a performance standpoint to index all relevant attributes used in searches.

IBM® Security Directory Server contains a set of attributes that are indexed by default. The attributes that are indexed by default can be found in the directory schema files. An attribute with the EQUALITY keyword in the schema files indicates that the attribute is indexed. Attributes can also be indexed by running the DB2 commands on the DB2 table that implement the attribute.

Use the following DB2 commands to verify whether a particular index is defined. In the example, the seeAlso attribute is searched to verify whether the attribute is indexed.

db2 connect to database_name
db2 list tables for all | grep -i seeAlso
db2 describe indexes for table database_name.seeAlso

where, database_name is the name of the database.

If the commands do not return three entries, the index is not properly defined. The command must return the following results:

IndexSchema    Index Name    Unique Rule    Number of Columns
-------------  ------------  ------------   ----------------- 
LDAPDB2        SEEALSOI       D               1 
LDAPDB2        SEEALSO        D               2 
LDAPDB2        RSEEALSO       D               2

3 record(s) selected.

It is important to run the runstats command on a table after you create an index. The runstats command provides statistical information to the DB2 optimizer that aids the optimizer to take decisions about optimizing searches on that table.

To know more on indexing, see the section DB2 index reorganization.



Feedback