April 17th, 2012, 11:42 AM
Sub OU Queries
I'm a beginner in LDAP, so what a usually do are simple queries to retrieve basic attributes.
Now I have issues i can't solve with simple queries.
Structure for the problem:
-accounActive (attribute of user)
-ou=BlockHistory ( ou under each user )
--blockDate (attribute of block history)
i need to retrieve blocked users and their block history.
Is there a way to do this in a single query?
the way i'm performing the search today is:
retrieve all users that have account deactivated
then, for each user, search it's block history. so i can se if it is deactivated for blocking.
if he has a block history, then ok. I put him on my list. else, don't.
It works, but I have a problem concerning performance. I have cases where the first query may return like 20000 users, and you can imagine what happens in this case.
transaction timeouts can't happen here
for this, i'd like to know: can I get all the attributes i want in a single query?
Thanks a lot for your help!!