[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: objectclass index
> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> One way to optimize filters is to short-cut AND and OR filters
> much like C does. Of course, you can only short-cut AND filters
> which are guaranteed to be False and OR filters which are
> guaranteed to be True. Note that special care must be given
> to Undefined.
> I note that (objectClass=*) is technically not guaranteed to
> be True. So, it would be inappropriate to replace it with a
> computed True value. However, treating it as ALLIDS for
> indexing purposes is fine, as test_filter will eliminate
> candidates for which (objectClass=*) is not True.
> In handling of Referral/Alias filter mucking, I suggest
> reworking the filter so it basically:
> (&(scope-filter)(|(real-filter)(objectClass=referral)(objectClass=alias)))
> so that if (real-filter) returns ALLIDS, the filter can be
> short-cutted.
>
> I'm not awaken enough yet to compare this to what Howard has
> actually implemented, I suspect it's close.
It's a bit shy of that. What is patched in back-ldbm is that (objectClass=*)
will return ALLIDS as discussed, and also subtree scope where the search
base is equal to the backend suffix returns ALLIDS. The steps to take
advantage of this and actually shortcut the filter have not been written for
back-ldbm yet.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support