[turba] How do Turba LDAP filters work?
Kevin Myer
kevin_myer at iu13.org
Wed Jul 20 09:18:46 PDT 2005
I'm trying to resolve some performance issues with my LDAP address book lookups.
I have specified the following filter:
objectclass=person
However, from my LDAP server logs, the filter that is being used is not that
but:
filter="(|(objectClass=top)(objectClass=person)(objectClass=inetOrgPerson)(objectClass=calEntry)(objectClass=organizationalPerson))"
Those object classes are what are in my objectclass array in my Turba
sources.php config, so I'm a little confused as to what the purpose of the
objectclass array is. It appears to actually be ANDing any filter value I
specify, with the objectclass array, but then whats the purpose of the filter
value in sources.php?
And I'm finding that for all the results returned (approximately 1400 users),
there is a search occuring against base="uid=uid,ou=people.." for each user.
This is very inefficient.
What should be generated:
SRCH base="ou=People,dc=iu13,dc=k12,dc=pa,dc=us" scope=1
filter="(objectClass=person)" attrs="dn uid cn mail sn title o postalAddress
telephoneNumber facsimileTelephoneNumber homePostalAddress homePhone mobile
description roomNumber ou displayName labeledUri object_pgppublickey calFBURL
l"
What is happening:
(the equivalent of foreach the_uid):
SRCH base="uid=the_uid, ou=People, dc=iu13, dc=k12, dc=pa, dc=us" scope=0
filter="(|(objectClass=person))"
attrs="dn uid cn mail sn title o postalAddress telephoneNumber
facsimileTelephoneNumber homePostalAddress homePhone mobile description
roomNumber ou displayName labeledUri object_pgppublickey calFBURL l"
The former is one search, with 1400 results and takes .239s .
The latter is 1400 searches with 1 result per search and takes over 4 seconds.
Kevin
--
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13 http://www.iu13.org
More information about the turba
mailing list