https://bugs.openldap.org/show_bug.cgi?id=9261
--- Comment #2 from matthew.slowe@jisc.ac.uk ---
a) OpenLDAP 2.4.44 is 3 years old. b) back-hdb is deprecated
Do you know, therefore, if this behaviour is not present in more recent version? It's "current" in the RHEL/CentOS 7 platform and, probably, in widespread use.
c) back-hdb requires significant tuning to be performant of both the BDB caches and the entry/idl/dn cache
I don't claim to know a huge amount about the internals of openldap but the discrepancy between the two "sub" searches seemed very bug like to me particularly where it doesn't seem to do any debug log for that length of time.
d) what you're describing is generally a known issue with back-hdb until the caches (if properly configured) are primed.
I do not believe this to be a caching problem, this instance has been "up" and busy for some time and the behaviour is repeated when running the same queries again.
Generally questions such as this should be sent to the openldap-technical list rather than filed in the ITS system.
My apologies. I had searched for a relevant post or issue and, not finding one, this seemed like the best place to make a record of it.