I tried to increase the cachesize and idlcachesize to 100000 and
restarted the slapd, but it did not help.
If you are using back-hdb, and using a subtree as the base (which it
looked like you were doing), the first time through the search will be
very slow while the cache is filled. That's a long-standing issue with
back-hdb. Subsequent searches are substantially faster.
Thanks, but I use bdb as backend (see config). Due more investigation
today I find out, that if I use cachsize and idlcachsize about 500000
the second response (after first search) is quite faster, because now
the entries are cached. But by configuring an index for objectClass
it should avoid for searching all the entries?