Improving Directory Search Performance

As an application developer you can increase the performance of your search operations, reduce memory usage, and reduce the load on the server by observing a few rules of thumb:

  • Use indexed attributes

  • Specify an object class in your filter to get only entries of the desired type

  • Retrieve only attributes you need

  • Keep the DN handy

  • Use compare where it makes sense

Use Indexed Attributes

The most significant way to get good performance from the directory when searching is to use only indexed attributes in your search requests. As a programmer you may need to work with your directory administrator to determine which attributes are indexed or to request that additional attributes be indexed. If you find you need ...

Get LDAP Programming with Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.