HI!
We all know the following messages in syslog (loglevel stats):
mdb_equality_candidates: (foo) not indexed
At first glance this seems helpful to find indexing issues.
But IMO 1. this is somewhat mis-leading. regarding performance tuning and 2. if internal searches are conducted (e.g. by set-based ACLs) the amount of the very same indexing warnings is really annoying and costs performance due to excessive logging.
AFAIK a set of search candidates is derived from filter assertions by first searching the indexed attributes. Then the non-indexed assertions are tested but only on the search candidate set. Is this correct? If yes, then indexing an attribute which is present in many entries can lead to large search candidate set even though the amount of final search results are small.
Consider the following simple example:
(&(objectClass=posixAccount)(uid=foo))
With lots of user accounts this would lead to two search candidate sets, one very large and one with one entry (assuming uid values are unique). Not indexing objectClass would one result in *one* search candidate. So indexing objectClass might not be very wise.
What do you think about this?
Ciao, Michael.