nerdexam
Linux_Foundation

LFCS · Question #165

Which command should be used to optimize LDAP searches?

The correct answer is C. slapindex. The slapindex command is used to optimize LDAP searches by regenerating the database indexes for an OpenLDAP server.

Submitted by suresh_in· Apr 18, 2026Service Configuration

Question

Which command should be used to optimize LDAP searches?

Options

  • Aldapsearch -b sub
  • Bmake /var/lib/openldap-data/
  • Cslapindex
  • Dslapd -r +20
  • Eslapd -instances=10 -f

How the community answered

(41 responses)
  • A
    5% (2)
  • C
    90% (37)
  • D
    2% (1)
  • E
    2% (1)

Why each option

The `slapindex` command is used to optimize LDAP searches by regenerating the database indexes for an OpenLDAP server.

Aldapsearch -b sub

`ldapsearch -b sub` is a command to perform an LDAP search with a specific scope, not a utility to optimize the server's search capabilities.

Bmake /var/lib/openldap-data/

`make /var/lib/openldap-data/` is not a valid OpenLDAP command; `make` is a build system utility, and `/var/lib/openldap-data/` is a directory path.

CslapindexCorrect

`slapindex` is a dedicated OpenLDAP utility designed to rebuild and update the indexes for the database files used by the `slapd` daemon. Properly maintained and configured indexes significantly improve the performance of LDAP search operations by enabling the server to quickly locate matching entries without exhaustive scans of the entire database.

Dslapd -r +20

`slapd -r +20` is not a standard or documented OpenLDAP command for optimization; the `-r` option for `slapd` enables read-only mode, and `+20` is not a recognized parameter.

Eslapd -instances=10 -f

`slapd -instances=10 -f` is not a standard or documented OpenLDAP command for optimization; `slapd` does not possess an `instances` option for this purpose.

Concept tested: OpenLDAP database indexing

Topics

#LDAP#Indexing#Performance Optimization#Directory Services

Community Discussion

No community discussion yet for this question.

Full LFCS Practice