Bug 40567 - index: remove / reduce "pres" indexes
index: remove / reduce "pres" indexes
Status: NEW
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 4.4
Other Linux
: P5 enhancement (vote)
: UCS 4.x
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-03 13:42 CET by Ingo Steuwer
Modified: 2024-04-12 17:49 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Large environments
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2016-02-03 13:42:00 CET
according to OpenLDAP documentation it makes no sense to have "pres" indexes for most use cases. We should review that and remove them from the default if possible.

from http://www.openldap.org/doc/admin24/tuning.html

---------------
21.2.3. Presence indexing

If your client application uses presence filters and if the target attribute exists on the majority of entries in your target scope, then all of those entries are going to be read anyway, because they are valid members of the result set. In a subtree where 100% of the entries are going to contain the same attributes, the presence index does absolutely NOTHING to benefit the search, because 100% of the entries match that presence filter.

So the resource cost of generating the index is a complete waste of CPU time, disk, and memory. Don't do it unless you know that it will be used, and that the attribute in question occurs very infrequently in the target data.

Almost no applications use presence filters in their search queries. Presence indexing is pointless when the target attribute exists on the majority of entries in the database. In most LDAP deployments, presence indexing should not be done, it's just wasted overhead.

See the Logging section below on what to watch our for if you have a frequently searched for attribute that is unindexed.
---------------
Comment 1 Stefan Gohmann univentionstaff 2017-06-16 20:36:30 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 2 Florian Best univentionstaff 2017-06-28 14:52:37 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 3 Philipp Hahn univentionstaff 2024-04-12 17:47:34 CEST
(In reply to Ingo Steuwer from comment #0)
> according to OpenLDAP documentation it makes no sense to have "pres" indexes
> for most use cases.

> from http://www.openldap.org/doc/admin24/tuning.html
> 
> ---------------
> 21.2.3. Presence indexing
> 
> If your client application uses presence filters and if the target attribute
> exists on the majority of entries in your target scope, then

The important condition here is "AND if the target attribute exists on the MAJORITY of entries".

It does not make sense to filter for `(objectClass=*)` as that matches *ALL* entries, but `(sOARecord=*)` with a selectivity of <1% makes much sense.