Solved

A more efficient LDAP filter

Posted on 2016-09-20
3
51 Views
Last Modified: 2016-09-21
Each attribute here is definitely indexed, but the search takes too long.

What can I do to make it more efficient?

(&(|(mail=John.M.Doe@*)(proxyAddresses=*:John.M.Doe@*))(!(employeeID=123456)))

Open in new window

0
Comment
Question by:Dallas Smetter
3 Comments
 
LVL 5

Expert Comment

by:sAMAccountName
ID: 41807717
you could try using ambiguous name resolution and scoping the search to a targeted subtree.

I'm on mobile or I'd post a link, but you can easily Google " active directory anr" and get some good info
0
 
LVL 16

Accepted Solution

by:
Learnctx earned 500 total points
ID: 41807889
The reason your response time is so horrible is you have an open ended filter in your query:

(proxyAddresses=*:John.M.Doe@*)

Open in new window


This means you will generate a hugely inefficient query. Even though the attributes are indexed, you're going to end up touching every object in the directory that has a proxyAddresses attribute populated.

Is there any reason you're not specifying the protocol? You would be better to include the protocols you're looking for. Its always better to be more specific if you want a quick result. Either that or you need another attribute which limits the query scope instead of (!(employeeID=123456)).

This should return an instant result.

(&(|(mail=John.M.Doe@*)(proxyAddresses=smtp:John.M.Doe@*)(proxyAddresses=sip:John.M.Doe@*)(proxyAddresses=notes:John.M.Doe@*))(!(employeeID=123456)))

Open in new window


you could try using ambiguous name resolution and scoping the search to a targeted subtree.

ANR is great but in this case won't work any better than just using proxyaddresses, in my opinion.

Edit: There's a good Wiki article here on the MS community Wiki http://social.technet.microsoft.com/wiki/contents/articles/22653.active-directory-ambiguous-name-resolution.aspx
1
 

Author Closing Comment

by:Dallas Smetter
ID: 41809675
Thank you!!!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now