I get lots of suggestion of indexes by slapd in my logs:
<= mdb_equality_candidates: (cn) not indexed
<= mdb_equality_candidates: (gidNumber) not indexed
<= mdb_equality_candidates: (mail) not indexed
<= mdb_equality_candidates: (member) not indexed
<= mdb_equality_candidates: (memberUid) not indexed
<= mdb_equality_candidates: (sudoUser) not indexed
<= mdb_equality_candidates: (uidNumber) not indexed
<= mdb_equality_candidates: (uniqueMember) not indexed
<= mdb_equality_candidates: (virtualdomain) not indexed
<= mdb_substring_candidates: (sudoUser) not indexed
Since Yunohost makes it hard to edit LDAP server configuration (see https://github.com/YunoHost/issues/issues/1350), the default configuration should contain indexes for the fields used by Yunohost a lot.
As Wheezy is not supported anymore by next YunoHost releases, the slapd.conf
now comes with MDB as backend.
The LDAP database is also saved before switching to MDB backend and imported
after the configuration re-generation to prevent data loss.