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

RE: objectclass index



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.

Kurt

At 02:45 AM 2001-12-17, you wrote:
>The case I was thinking of that actually applies is when the user filter
>specifies "objectclass=*" (objectclass present) in which case the hardcoded
>test for objectclass=referral is unnecessary.
>
>  -- Howard Chu
>  Chief Architect, Symas Corp.       Director, Highland Sun
>  http://www.symas.com               http://highlandsun.com/hyc
>  Symas: Premier OpenSource Development and Support