Overuse of Presence Indexing
Created by Marty Heyman, last modified by Greg Noe on Jul 16, 2015
If there is a “performance problem” (real or perceived) and the schema contains “presence” indexing, the following should be considered.
An index on the “presence” of an attribute in an entry can significantly speed up searches where:
- The existance of those attributes in entries is relatively rare, and
- The search filter references those rare attributes.
Adding “presence indexes” for attributes that are not rare, that are present in most records, does not provide this benefit. They are seemingly benign on “search” but add to the cost of “add”, “modify”, and “delete” operations. There is some (modest) search overhead but it likely is insignificant. Therefore, this form of indexing, applied to attributes that are pervasive in most entries, can slow down add/modify/delete operations which, if a significant portion of the workload, can be a contributor to performance issues.
It is unlikely that this is a big problem for most use-cases but should be considered. Where such inappropriately indexed attributes are in use, however, the Directory will use more system resources than needed, potentially contributing to resource shortages leading to performance issues as usage grows.
When reviewing a configuration, try to remember to identify attributes with “presence” indexes and discuss whether they are truly “rare” with users. Explain that such indices on non-rare attributes are not beneficial and add to non-productive overhead. When appropriate, recommend removing them.