[Fedora-directory-users] Re: Total number of LDAP entries

David Boreham david_list at boreham.org
Tue Mar 10 15:30:46 UTC 2009


Rich Megginson wrote:
> Assuming your entry cache contains every entry (that is, assuming you 
> have enough RAM to cache every entry), you can query the entry cache 
> count and that should be the number of entries in your directory 
> server.  This is the (apparently) undocumented attribute called 
> currentEntryCacheCount in the cn=monitor entry for each database.
Hmm...this is a bit convoluted. You'd have to know the number of entries 
in advance, then make sure the entry cache size was configured to a 
larger number, then perform a search for all entries to force them into 
the cache, and finally read the count. Wouldn't it be easier to just use 
the search output to count the entries ? I suppose if you had a 
gazillion entries, so many that it would take a very long time to send 
them back to a client, then it might be worthwhile. You'd need to 
concoct a search that you knew would touch every entry but would not 
return any of them (a filter that is un-indexed and doesn't match any 
entry would do it).







More information about the Fedora-directory-users mailing list