Speeding LDAP Queries against the GC - 16 Jan 2008
January 15, 2008
We're building some applications that query objects from the domains in our forest. As part of the test process, we noticed that some Lightweight Directory Access Protocol (LDAP) queries against the Global Catalog (GC) take much longer than others. What causes this discrepancy, and can we fix it?
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" (http://support.microsoft.com/?kbid=256938) 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.
— Paul Robichaux
About the Author
You May Also Like