Re: slow AD ldap query or bad filter/algorithm?
Natxo Asenjo <[email protected]> Fri, 11 Dec 2015 15:23:17 +0100
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <CAHBEJzU1ecC6fz_1x6_Hv8eCmme0_nsusDPsuLZck3e-LpF4=A@mail.gmail.com> |
--089e011827588f795f0526a0100f Content-Type: text/plain; charset=UTF-8 hi, > > Maybe I need to get a list of users and save its info in another hash, >> that could be much faster than making lots of queries per group. >> > > > Another solution is to search users with a filter on memberOf attribute: > (memberOf=<DN of Group>), then you get directly all users entries that > belong to the group. > > I just tried this on the lan (so no vpn latencies) and the script now much faster: 30 seconds. I guess this will be as good as it gets :-) without first caching the user data. I will try the memberof filter righ now. Thanks! -- Groeten, natxo --089e011827588f795f0526a0100f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">hi,<br><div><div class=3D"gmail_extra"><div class=3D"gmail= _quote"><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:= 0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><d= iv class=3D"gmail_extra"><br><div class=3D"gmail_quote"><span class=3D""><b= lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px = #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div class=3D"gmail_extr= a">Maybe I need to get a list of users and save its info in another hash, t= hat could be much faster than making lots of queries per group.<span><font = color=3D"#888888"><br></font></span></div></div></div></blockquote><div><br= ><br></div></span><div>Another solution is to search users with a filter on= memberOf=C2=A0 attribute: (memberOf=3D<DN of Group>), then you get d= irectly all users entries that belong to the group.<span class=3D"HOEnZb"><= font color=3D"#888888"><br><br></font></span></div></div></div></div></bloc= kquote><div><br></div><div>I just tried this on the lan (so no vpn latencie= s) and the script now much faster: 30 seconds.<br><br></div><div>I guess th= is will be as good as it gets :-)=C2=A0 without first caching the user data= . I will try the memberof filter righ now.<br><br></div><div>Thanks!<br>=C2= =A0<br></div></div><div class=3D"gmail_signature">--<br>Groeten,<br>natxo</= div> </div></div></div> --089e011827588f795f0526a0100f--