LDAP queries are executed more slowly than expected in the AD or LDS/ADAM directory service and Event ID 1644 may be logged

Gilt für: Microsoft Windows Server 2003 Service Pack 2Windows Server 2008 StandardWindows Server 2008 Enterprise


On a Windows Server computer that uses an Active Directory Lightweight Directory Services (AD LDS) or Active Directory Application Mode (AD/AM) directory service, certain applications do not perform at expected performance levels. 

When you enable field engineering (debug) logging to trace an LDAP query, the following event log shows that the LDAP query is an inefficient query:Note The attributes that are used in this event are only examples.

Additionally, you experience high CPU utilization and a slow response time. If the database is considerably bigger than physical memory available to the directory server, you may also see increased disk IO while the processing such a query.

When you inspect the attributes in the search filter, you find that they all have indexes that are defined. And if attributes do not have indexes that are defined, and you add the indexes through a schema change, the problem persists or does not improves much.


When you create a network trace of the LDAP query, you notice that it is a paged query.

The LDAP server can only use one index while processing a paged query. This is because the LDAP implementation for paged searches does not create an expensive context for the query and thus only uses one index for a paged query.


To work around this problem, you can send the query without using the paged query control. This allows the LDAP server to optimize for more complex filters.

Noe that by default, paged queries are enabled for some LDAP client libraries. Therefore, you may have to write additional code in your application to enable and disable paged queries as appropriate for your specific situation.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

314980 How to configure Active Directory diagnostic event logging in Windows Server 2003 and in Windows 2000 Server