I wholeheartedly agree with point 2.
I will look at doing STATS in ADFIND in the next rev or
two. Give me a month, maybe two. Just starting to see the light of day
again. :o)
joe From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Fleischman Sent: Wednesday, April 21, 2004 10:28 AM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] LDAP Query Question 1)
It should
process objectcategory which is why I said I think perf gain should be
small. 2)
Right,
expensive on insert. My comment was only that indexes need be considered before
being just flipped on. If you flip on an index for a once-a-year query, that’s
not your best use of resources….you’re better off taking the somewhat larger
perf hit there than you are taking the small perf hit every day for the whole
year. 3)
Umm, I’d
say don’t parse the STATS output, just dump it. I can’t imagine parsing is going
to help…..STATS output tends to be one of those things that if you can read it,
great….but if not, parsing isn’t going to help much.
:) 4)
Good
question. I assume this is a subtree search? From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of joe 1. I would tend to
agree that the poerf difference should be small on this one, that is why I said
may or may not get a performance gain, it really depends on how AD optimizes the
query. I would hope it was smart enough to process the indexed pieces first and
then use the non-indexed pieces. At that point, the subset needed to be gone
over for non-indexed checks should be small, but I could be wrong in my guess
(too generous) on how the optimizer is working. 2. When you say
expensive, I guess you mean expensive on the insert operations, they shouldn't
have to be touched other than on an update or a new add correct? Just day to day
unless you are writing and rewriting an attribute it shouldn't be an issue and
if you are constantly rewriting an attrib there is question as to whether or not
it should be in an LDAP Store anyway. Is there further docs on tuple indices,
there is so little MS documentation that I have ever
found. 3. Thanks on the STATS
output stuff. I haven't even looked at it yet but from what I have seen in Docs,
the output doesn't seem to be heavily documented which makes me think I will
have to be careful in my parsing of it. I have to really look to see if I need
to restructure anything yet in the main code body. 4. Eric, which version
of the query in 3 should be more efficient based on your knowledge of the
optimizer? ------------- http://www.joeware.net (download
joeware) http://www.cafeshops.com/joewarenet (wear
joeware) From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Eric
Fleischman A few things inline (in
red) From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of joe A couple of
things 1. You don't really
need objectclass for this query. You may or may not get a performance gain for
removing it. 2. You don't mention
anything around the *SMS* part of the query.. if you don't need it, dump it, it
will be the slowest part of your query unless you have tuple
(medial) indices (not a default). 3. The
(!(samccountname=_*)(samaccountname=\2a*)(samaccountname=*SMS*)) isn't really
doing what I think you expect. I think you expect it would NOT all of those
items. It probably should NOT the first item and OR in the rest and then
ORed in all of them together. For your original
problem statement I think I would do something like (&(objectcategory=person)(|(!(sAMAccountName=_*))(!(sAMAccountName=\2a*))) Not really sure if that
or (&(objectcategory=person)(!(|(sAMAccountName=_*)(sAMAccountName=\2a*))))
would be faster. Best would be to test them both, maybe use the STATS control
(yes I have to add that one to ADFIND) or turn on the ldap query logging on the
DCs to see how they show up in terms of efficiency.
[EFLEIS] – If you need
help understanding the STATS output just holler. And yes it should be exposed in
adfind, although I’ve still never used adfind, but it sounds
useful. Oh, and the comment
about logging and STATS…..yea, mostly useful if running 2k03 which you didn’t
mention. If not 2k03 you won’t get as much spew from the logging options and
such.
joe ------------- http://www.joeware.net (download
joeware) http://www.cafeshops.com/joewarenet (wear
joeware) From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of
[EMAIL PROTECTED] Hey
folks, I’m
trying to write an LDAP query to return the users that don’t begin
with two different characters, either an underscore (_)
or an asterisk (*). I’ve searched the archives… so forgive me if this is a
repeat. J (& (objectcategory=person) (objectclass=user) (|
(!
(sAMAccountName=_*)
(sAMAccountName=\2a*)
(sAMAccountName=*SMS*)
)
) ) Any
suggestions? J
Thanks! |
Title: LDAP Query Question
- RE: [ActiveDir] LDAP Query Question Cotter, Paul M.
- RE: [ActiveDir] LDAP Query Question Michael B. Smith
- RE: [ActiveDir] LDAP Query Question Marcus.Oh
- RE: [ActiveDir] LDAP Query Question Cotter, Paul M.
- RE: [ActiveDir] LDAP Query Question Michael B. Smith
- RE: [ActiveDir] LDAP Query Question Marcus.Oh
- RE: [ActiveDir] LDAP Query Question Merry, Joel (US - Philadelphia)
- RE: [ActiveDir] LDAP Query Question Eric Fleischman
- joe