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

Re: tuning searches

At 10:16 AM 5/15/00 -0500, Vinod Nair wrote: 
>In a compound search, such as 
>    (&(attr1=value1)(attr2=value2)(attr3=value3)) 
>is the order of evaluation left-to-right ?

In OpenLDAP, yes.

>I'm assuming the first expression prunes the search
>space for the 2nd, and so forth. In that case, it
>would make sense to place the "most restrictive"
>expression up front (and have it indexed).

Basically, yes.

>Also, how is the "search base" used to prune the search ?

Depends upon the version of OpenLDAP and configuration.
In some versions, DN sub index was enabled by default.  However,
I believe it is off in current versions.

>Is this used to get an appropriate "range" from the underlying btree ?

No. back-ldbm treates the underlying datastore as a simple
key/value system.  It may or may not be a btree.

>Or is the base DN being used in some other way to prune the search space ? 

If a substr DN index is available, it is used.