Bug 28633 - optimize search filter of users/user in lookup() function
optimize search filter of users/user in lookup() function
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.1
Other Linux
: P5 enhancement (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
Depends on:
  Show dependency treegraph
Reported: 2012-09-24 15:04 CEST by Philipp Hahn
Modified: 2017-07-05 13:06 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?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Large environments, UCS Performance
Max CVSS v3 score:
hahn: Patch_Available+


Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2012-09-24 15:04:16 CEST
Derzeit nutzt users/user den folgenden Suchfilter:

Wegen der SUP-Relation zwischen inetOrgPerson IS-A organizationalPerson IS-A person lassen sich die 3 zusammenfassen zu

Das verbessert leicht die Performance:
# time univention-ldapsearch -xLLL '(&(|(&(objectClass=posixAccount)(objectClass=shadowAccount))(objectClass=univentionMail)(objectClass=sambaSamAccount)(objectClass=simpleSecurityObject)(&(objectClass=person)(objectClass=organizationalPerson)(objectClass=inetOrgPerson)))(!(uidNumber=0))(!(uid=*$)))' dn >/dev/null
real    0m2.591s
user    0m0.296s
sys     0m0.136s
# time univention-ldapsearch -xLLL '(&(|(&(objectClass=posixAccount)(objectClass=shadowAccount))(objectClass=univentionMail)(objectClass=sambaSamAccount)(objectClass=simpleSecurityObject)(objectClass=inetOrgPerson))(!(uidNumber=0))(!(uid=*$)))' dn >/dev/null 
real    0m2.348s
user    0m0.316s
sys     0m0.128s

# univention-ldapsearch -xLLLb 'cn=Subschema' -s base objectClasses | ldapsearch-wrapper | egrep --color "NAME '[^']*[Pp]erson'|SUP \w*[Pp]erson"
objectClasses: ... NAME 'organizationalPerson' ... SUP person
objectClasses: ... NAME 'inetOrgPerson' ... SUP organizationalPerson
Comment 1 Johannes Keiser univentionstaff 2017-06-30 17:59:03 CEST
Applied rebased patch:

r 80748
univention-directory-manager-modules (12.0.17-45) 
* Bug #28633: Applied patch from Philipp Hahn - Optimize search filter of
users/user in lookup_filter()

YAML: r 80750
Comment 2 Florian Best univentionstaff 2017-07-03 15:52:37 CEST
OK: filter optimization
Comment 3 Janek Walkenhorst univentionstaff 2017-07-05 13:06:03 CEST