Creating IndexesChapter 10 Managing Indexes 399Creating indexes from the command-line involves two steps:• Using the ldapmodify command-line utility to add a new index entry or editan existing index entry.• Running the db2index.pl Perl script to generate the new set of indexes to bemaintained by the server.The following sections describe the steps involved in creating indexes.Adding an Index EntryUse ldapmodify to add the new index attributes to your directory. If you want tocreate a new index that will become one of the default indexes, add the new indexattributes to the cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config entry.To create a new index for a particular database, add it to thecn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config entry,where cn=database_name corresponds to the name of the database.For information on the LDIF update statements required to add entries, see “LDIFUpdate Statements,” on page 63.For example, assume you want to create presence, equality, and substring indexesfor the sn (surname) attribute in the Example1 database.NOTE You cannot create new system indexes because system indexes arehard-coded in Directory Server.NOTE Avoid creating entries under cn=config in the dse.ldif file. Thecn=config entry in the simple, flat dse.ldif configuration file isnot stored in the same highly scalable database as regular entries. Asa result, if many entries, particularly entries that are likely to beupdated frequently, are stored under cn=config, performance willprobably suffer.Although we recommend you do not store simple user entries undercn=config for performance reasons, it can be useful to store specialuser entries such as the Directory Manager entry or ReplicationManager (supplier bind DN) entry under cn=config since thisallows you to centralize configuration information.