On Wednesday 19 September 2007 15:52:02 Ace wrote:
Hi Masters,
We have around 100000 entries of the form -
dn: cn=rr1,ou=addressbook,dc=zlemail,dc=com objectClass: top objectClass: inetOrgPerson mail: rr1@oo.com userPassword: a@123 cn: rr1 sn: rr1
What should be the index for fast search?
As Quanah and Aaron replied, the search filters you use will determine the indexes you need.
However, most mail clients will search on the cn, sn, and maybe the mail attribute, so you probable need equality and substring indexes on those 3 attributes, plus the standard equality index on objectclass. It is unlikely that you will need to index userPassword.
However, I note that with a relatively large database, your entry cache and backend database cache tuning is also critical to performance.
If you are seeing high CPU utilisation, check the logs for errors relating to indexes, and add the indexes slapd is complaining are missing. If you have high load average but low CPU utilisation (thus high load due to IO wait), you need to look at your cache tuning.
For anyone to provide more assistance, you need to provide more details on your configuration (OpenLDAP version, backend you are using, any tuning you have done, possibly the sizes of the files in your database directory).
Regards, Buchan