user2753523
user2753523

Reputation: 483

How to reduce ldap search time?

I am going to search one user from a list of 100k entities, but it seems to be taking more than 15 minutes duration and like that I have to search 33000 users,Is there an optimal way which will return results in 5 minutes?

Upvotes: 0

Views: 686

Answers (1)

user207421
user207421

Reputation: 311028

Strange filter. Almost certainly not what you really want.

At the moment you're looking for any entry of any objectClass that even has a cn attribute, and presumably you're then searching yourself through the thousands of returned entries for the one you want.

Instead, you should be searching directly for the one entry you want, by specifying both a concrete objectClass, e.g. inetOrgPerson, and a concrete cn, being the cn of the user you're looking for.

You must ensure that both objectClass and cn are indexed.

Upvotes: 1

Related Questions