[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Question about ldap filter



Jason Voorhees writes:
> Thanks. That allows me to build complex filters using OR logic without
> being worried about performance.

Sorry, no.  First slapd must locate all entries to compare with the
filter.  For that it uses indexes.  First it uses the DN index, to find
just the entry IDs of just entries in the search scope.

Then if all the ORed components are indexed, it can narrow this list
further down by only checking entries that match one of the filter
components.  OTOH if one of the ORed components is not indexed, slapd
cannot narrow down the entry candidate list further.

Finally it checks each candidate entry against the filter.  When
checking an entry, slapd can indeed stop the first time an OR yields
TRUE.  Or the first time an AND yields not-TRUE (FALSE or Undefined).

-- 
Hallvard