Bug 53259 - index: Review / discuss what LDAP indices we need
index: Review / discuss what LDAP indices we need
Status: NEW
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-14 10:51 CEST by Jürn Brodersen
Modified: 2024-04-16 17:49 CEST (History)
2 users (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?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2021-05-14 10:51:19 CEST
Review / discuss what LDAP indices we need

For bug 53191 we decided against adding attributes which produced the "not indexed" warning.

To many indices can slow down the LDAP server performance:

- https://unix.stackexchange.com/questions/451118/openldap-bdb-equality-candidates-memberof-not-indexed
As i understand this, every index produces search candidates e.g. "(&(univentionObjectType=users/user)(uid=foo))" one big set of candidates for "univentionObjectType" and a small one for "uid". This is slower than just having an index for "uid"

50000 users -> 2.9ms for both indices, 2.7ms only for uid as an index.

- Write operations need to update indices
Time to delete a user in a domain with 50000 users
98ms default ucs indices
31ms only uid + objectClass as indices


Looking at the numbers above, generally it still seems to be the right approach to add an index, since searches can be magnitudes slower without an index.
Comment 1 Philipp Hahn univentionstaff 2024-04-16 17:49:12 CEST
There's a maximum number for indices in OpenLDAP:
  servers/slapd/back-mdb/back-mdb.h:45
  > #define MDB_INDICES»»···256