Speeding up LDAP Queries

By | 2008-01-25

The GC server contains a replica of every object in every domain in the forest but stores only some of the attributes for each of those objects.

Think of a phone book: It lists the names and addresses of the people in your city, but it doesn’t show their height, weight, or eye color. Many attributes in the GC are indexed to speed up queries against them.

If your code is searching for an attribute that isn’t in the GC or one that’s present but not indexed, the query will take an unusual amount of time.

The Microsoft article “Default Global Catalog Attributes in Windows 2000 Active Directory Schema” lists the indexed attributes. By querying these attributes (or forcing the GC to index the attributes you do use), you can significantly improve your search performance.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.