Problem
syslog shows the message
slapd[101058]: <= mdb_equality_candidates: (univentionMonitoringAlertHosts) not indexed
where the PID may vary.
Environment (optional)
UCS 5.0-2 and later.
Solution
Generally, this message may indicate a potential to increase the performance of LDAP searches and the tool /usr/share/univention-ldap/ldap_setup_index
may be used to adjust the slapd.conf
configuration for indices.
But there are cases where this message is not indicating a performance problem and can be ignored. Known cases:
-
univentionMonitoringAlertHosts
: This attribute is only searched for once during app installation. That’s why the developers decided that it’s more efficient to not create an index for that attribute.
Background Information
Due to the way the OpenLDAP slapd
handles LDAP filters containing combined criteria (like (&(foo=bar)(baz=zap))
, configuring indices for each and every LDAP attribute may sometimes not raise the performance of LDAP searches, as explained e.g. in this posting.
Sometimes there is a similar but different message mdb_inequality_candidates: (attr1) not indexed
. This message regarding inequality occurrs, in cases where an LDAP filter is used that has a comparison like (reqStart>=20120313072338Z)
. Depending on the specific LDAP filter combination it may also be detrimental to the LDAP server performance to add an index for this, as discussed in this posting. In OpenLDAP 2.5 this message is not issued any longer with default log levels.
It may also be noteworthy that negation in LDAP filters, e.g. (!(foo=bar))
causes slapd
to ignore the index (TODO: citation needed).