directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Carlo.Acco...@ibs-ag.com>
Subject RE: Is it faster/better to include one objectclass or all in query?
Date Wed, 14 Mar 2012 16:14:21 GMT
Ok, Thank you again.. I'm crystal clear on this now. 


Regards,
Carlo Accorsi

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Wednesday, March 14, 2012 12:11 PM
To: users@directory.apache.org
Subject: Re: Is it faster/better to include one objectclass or all in query?

Le 3/14/12 4:18 PM, Carlo.Accorsi@ibs-ag.com a écrit :
> Emmanuel, thank you.  One follow-up and I should have included this in the original message.
 My query includes an OU as the base dn in the search.
> All entries in this OU all have the same 4 objectclass values. No other objectclass types
are in this particular OU.
> Say I had 1000 entries. Each count for top, person, organizationalPerson and inetOrgperson
would all yield 1000 hits. In this case, should I include the objectclass in the query at
all?

If you start your search from a given baseDN, and if there is no children, then there is no
need to use any (objectClass=XXX) in your filter, as it will match all the entries at this
level. And as we use a special index for searches starting at a position in the DIT, it's
enough.

You have 3 specific index that I have not talked about :
- ONE_LEVEL index, which is used to select all the entries from a position in the DIT, plus
all theirs direct children (excluding the
descendants)
- SUB_LEVEL index, which selects all the descendant entries from a position, except the given
base DN
- RDN index : which is internally use to browse the DIT

If you have specified a baseDN, and a scope (default is SUBTREE), those index will be used
anyway.

--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Mime
View raw message