• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 143
  • Last Modified:

A more efficient LDAP filter

Each attribute here is definitely indexed, but the search takes too long.

What can I do to make it more efficient?


Open in new window

Dallas Smetter
Dallas Smetter
1 Solution
sAMAccountNameSr. Systems EngineerCommented:
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
The reason your response time is so horrible is you have an open ended filter in your query:


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.


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
Dallas SmetterSolution EngineerAuthor Commented:
Thank you!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now