[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: counter number of records matched the filter?



Hi Paul,

  Thanks. But what I am interested is only the number of records that meet
the search filter, I don't need to read each entries from LDAP. I think
ldap_search_s asks LDAP to returns the entries that match the filter,
ldap_count_entries() just travese the result list from ldap_search_s call to
obtain the counter value. Consider that are 100,000+ entries that meet the
search filter, it becomes very inefficient.

Regards,

- Joe

----- Original Message ----- 
From: "Paul Jarc" <prj@po.cwru.edu>
To: "Joe Wong" <joewong@tkodog.no-ip.com>
Cc: <openldap-software@OpenLDAP.org>
Sent: Wednesday, July 30, 2003 10:53 PM
Subject: Re: counter number of records matched the filter?


> "Joe Wong" <joewong@tkodog.no-ip.com> wrote:
> >  It is possible to ask the LDAP server to return the number of
> > records/entries that meet the searching criteria?
>
> ldap_count_entries() does that.  I don't know whether it incurs less
> network traffic than looping through the entries.
>
>
> paul
>