[Date Prev][Date Next]
Re: counter number of records matched the filter?
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.
----- Original Message -----
From: "Paul Jarc" <firstname.lastname@example.org>
To: "Joe Wong" <email@example.com>
Sent: Wednesday, July 30, 2003 10:53 PM
Subject: Re: counter number of records matched the filter?
> "Joe Wong" <firstname.lastname@example.org> 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.