Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Active Directory > getting property problems

Reply
Thread Tools Display Modes

getting property problems

 
 
Eric
Guest
Posts: n/a

 
      03-20-2010
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



 
Reply With Quote
 
 
 
 
Florian Frommherz
Guest
Posts: n/a

 
      03-21-2010
Howdie!

Am 20.03.2010 19:34, schrieb Eric:
> 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.


Depending on how large your database is and how well equipped your DC(s)
is/are, it might take that long, though 20 seconds is still a quite long
time. If the filter above is the real filter AD has to process, it'll
walk through the ou attribute's index and search from there. I suspect
the OU is not that small so it doesn't really shrink the number of
potential search results compared to the whole DIT.

I'd probably try to filter the result set further down by adding other
filter criteria. If you're searching only managers, why not including
(objectClass=user)(objectCategory=person) to only filter for user accounts?

Is that .Count call another query to the LDAP server? You might probably
want to save your results in an enumeration and count from there rather
than again calling a search from the LDAP server and gather the search
results number (if that's the case).

For your UID case -- it looks like you again query the LDAP server to
gather it. As far as I know, .NET would gather the search results with
all their attributes available rather than limiting the attribute list
to a set of necessary attributes. I'm not an .NET expert but would look
into how .NET collects search result information and see whether it
already has the uid attribute for every search result it gets rather
than re-calling a LDAP search.

But then again, it seriously shouldn't take minutes to get those
results. That's a matter of seconds in bad cases. Depending on what
you're running (AD? LDS?) I'd turn on Field Engineer logging and see
what the stats say. You probably want to use a different application to
compare the search stats with your own app to see what those come up
with. .NET does a lot of things under the cover. Chances are it just
burns time there. LDP does LDAP searches pretty well, just enable the
"STATS" control. ADFind is worth a look, too.

Cheers,
Florian

> 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
>
>
>


 
Reply With Quote
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      03-22-2010


"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
--


 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      03-24-2010
Thank you for your answer. I'll give it another shot.

rg,
Eric


"Florian Frommherz" wrote:

> Howdie!
>
> Am 20.03.2010 19:34, schrieb Eric:
> > 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.

>
> Depending on how large your database is and how well equipped your DC(s)
> is/are, it might take that long, though 20 seconds is still a quite long
> time. If the filter above is the real filter AD has to process, it'll
> walk through the ou attribute's index and search from there. I suspect
> the OU is not that small so it doesn't really shrink the number of
> potential search results compared to the whole DIT.
>
> I'd probably try to filter the result set further down by adding other
> filter criteria. If you're searching only managers, why not including
> (objectClass=user)(objectCategory=person) to only filter for user accounts?
>
> Is that .Count call another query to the LDAP server? You might probably
> want to save your results in an enumeration and count from there rather
> than again calling a search from the LDAP server and gather the search
> results number (if that's the case).
>
> For your UID case -- it looks like you again query the LDAP server to
> gather it. As far as I know, .NET would gather the search results with
> all their attributes available rather than limiting the attribute list
> to a set of necessary attributes. I'm not an .NET expert but would look
> into how .NET collects search result information and see whether it
> already has the uid attribute for every search result it gets rather
> than re-calling a LDAP search.
>
> But then again, it seriously shouldn't take minutes to get those
> results. That's a matter of seconds in bad cases. Depending on what
> you're running (AD? LDS?) I'd turn on Field Engineer logging and see
> what the stats say. You probably want to use a different application to
> compare the search stats with your own app to see what those come up
> with. .NET does a lot of things under the cover. Chances are it just
> burns time there. LDP does LDAP searches pretty well, just enable the
> "STATS" control. ADFind is worth a look, too.
>
> Cheers,
> Florian
>
> > 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
> >
> >
> >

>
> .
>

 
Reply With Quote
 
Eric
Guest
Posts: n/a

 
      03-24-2010
thank you for your answer. I'll give it another shot.

rg.
Eric


"Richard Mueller [MVP]" wrote:

>
> "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
> --
>
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to repair Vista? Jack Tripper Windows Vista Installation 25 03-16-2008 01:20 PM
Drobo Problems with Vista 64 Dajad Windows Vista Administration 0 03-14-2008 12:36 PM
Problems with WiFi and S/W on refurb notebook with 64-bit Vista Stratum Windows Vista Installation 13 11-14-2007 03:12 PM
RE: Vista problems Johnathonm Windows Vista Hardware 1 12-13-2006 12:33 AM
Grafik and Style where good but a lot of Problems Benny35 Windows Vista Hardware 0 08-14-2006 04:50 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59