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.
Question
Options
- Aldapsearch -b sub
- Bmake /var/lib/openldap-data/
- Cslapindex
- Dslapd -r +20
- Eslapd -instances=10 -f
How the community answered
(41 responses)- A5% (2)
- C90% (37)
- D2% (1)
- E2% (1)
Why each option
The `slapindex` command is used to optimize LDAP searches by regenerating the database indexes for an OpenLDAP server.
`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.
`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.
`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.
`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.
`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
Community Discussion
No community discussion yet for this question.