Seeing the error message mdb_equality_candidates: (xyz) not indexed in your OpenLDAP/slapd logs? This may be a solution..
It points to the use of a value stored in your LDAP server that is being used/queried. Adding it to the list of indexed fields should remove the error from the logs, and no doubt, improve the performance and results of your LDAP queries.
The best way to do it is to create a ldif file and import the new value. A sample is given here adding the field 'mail' to the list of indexed fields:
dn: olcDatabase(1)mdb,cn=config
changetype: modify
add:olcDbIndex
olcDbIndex: mail eq
(Note: the above has been saved as mdbIndex-mail.ldif for use in the next step)
It modifies the online configuration section of OpenLDAP, and needs to be imported with the configuration admin account, eg. cn=admin,cn=config and password, not an account that is stored in your live regular environment.
A suitable command to import the file is:
ldapmodify -H ldapi:/// -D cn=admin,cn=config -W -f mdbIndex-mail.ldif
You will be prompted for the relevant password with the use of the -W option.
On successful import you should no longer see the error in your logs.