"Eric" <> wrote in message
news:22B13C29-A0AB-4380-9999-...
> Hi,
>
> I have a little program to work out how to get certain information from my
> companies LDAP.
> - Connecting to the LDAP is not a problem.
> - I want to search all entries with the filter is
> (&(ou=ENN)(eriIsManager=Y))
> the ou property holds the company name and the other one is to select only
> those who are a manager.
> - the time needed by the FindAll is taking about 20 sec for 20 results, I
> find it a bit long.
> - when I want to show the number of results found on my form with .count
> it
> takes a really long time (in minutes!).
> - after that I want to read the uid property from the results and again it
> takes minutes.
>
> Why these long times?
> Is it a server problem?
>
> is the software contacting the server with each investigation of a
> property?
>
> Please help me?
>
> rg,
> Eric
>
You must have populated the ou attribute of user objects. This attribute is
only mandatory for OU objects. It seems like the query should be fast, since
ou is indexed. However, it should be faster to make the base of the query
the Distinguished Name of the OU and make the filter either (eriIsManager=Y)
or (&(objectCategory=person)(objectClass=user)(eriIsM anager=Y)).
I'm used to .Count being a method of the recordset that results from a
query. The method must enumerate the entire recordset, but this is in local
memory (and in your case there are only 20 rows). It should not involve
another query of the server, unless the code specifies that the query be
repeated.
--
Richard Mueller
MVP Directory Services
Hilltop Lab -
http://www.rlmueller.net
--