Ability to control the number of indexes being used by the Directory Server.
Try This... Reduce the number of indexes.
Factoid: Proper indexing is the most important thing you can do to improve read performance. The performance improvements you can achieve through all other tuning areas are insignificant in comparison to creating the right set of indexes in your Directory Server.
Directory Server Administrator's Guide: Chapter 7, Managing Indexes. Consult the Netscape Directory Server Administrator's Guide for specific examples on running the db2index command-line tool on NT and Unix systems.
> | # Indexing To make sure you are getting the most out of your indexing, you need to understand the type of searches your client performs. You should set indexes on the attributes that your client is going to request often. For example, if your client is a mail server, it will most likely search only for an exact match on the UID attribute. You would therefore set indexes on the UID attribute. You would not need to index other attributes or use sub-string indexes unless the directory is servicing other types of clients as well. ### Using The Access Logs You can determine which searches are indexed by notations in the access log. Indexed searches are indicated with an "I" and un-indexed searches will be indicated with a "U". You can look at your logs and then set up additional indexes on attributes that are returned by un-indexed searches. While indexing makes searches much faster, the server must create these indexes whenever it writes the entry. As a result, maintaining the indexes causes adds, modifies, deletes and imports to be slower than they would be without indexes. Sub-string indexes are the most expensive in this respect and sometimes unnecessary as is the case with the mail server scenario. In addition, there is no reason to maintain sub-string indexes on all attributes. To minimize the performance impact of maintaining unnecessary indexes, periodically check the access log to understand the frequency of certain searches. This will help you verify that you are not maintaining indexes for attributes that are infrequently searched. The following table illustrates the relative cost of maintaining certain types of indexes. The cost is expressed in terms of the number of logical database writes associated with maintaining the index for a given value.
> Type of Index | Relative Cost to Index a Value | Example Value: "first middle last"
> Presence | 1 | 1
> Equality | 1 | 1
> Approximate | 1 * number of words in value | 3
> Sub-string | 1 * number of characters in value | 17
### Reduce the number of indexes If possible, reduce the number of indexes being used by the directory server. For example, if the directory server is used solely for mail lookups, only the following attributes need to be indexed (using exact match only): `uid`, `mail`, `mailHost`, and `mailAlternativeAddress`. These four attributes must be indexed regardless. For the change to take effect after index changes, the database will need to be recreated. Note that if an index is added or modified, then the existing records must be exported to a LDIF file before recreating the database. A command line utility is available if only one index or one member is added. ### Creating Indexes The following is intended to give you a general idea of how indexes are created. #### From the Server Console You can use the server console to create indexes. While the index is being created, the server is in read-only mode and configuration changes and changes to the contents of the directory cannot be made. From the Directory Server Console, the general procedure is as follows: Select the Configuration tab and then the database icon. Select the Indexes tab in the right pane. Select or confirm attributes. Select the checkbox for each type of indexes you want maintained for the attribute. Click save. #### From the Command-Line Creating indexes for attibutes using the command-line is a two step process. 1. Add the index description to `slapd.ldbm.conf`, then export and reimport the database using LDIF. The form is: `index <attribute> [<list of indexes>] [<list of OIDs>]` 2. Run the `db2index` command-line tool.

Copyright © 2000
Sun-Netscape Alliance