LX0-104 · 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 and ensuring the integrity of the OpenLDAP database indexes.
Question
Options
- Aldapsearch -b sub
- Bmake /var/lib/openldap-data/
- Cslapindex
- Dslapd -r +20
- Eslapd -instances=10 -f
How the community answered
(16 responses)- A6% (1)
- C94% (15)
Why each option
The `slapindex` command is used to optimize LDAP searches by regenerating and ensuring the integrity of the OpenLDAP database indexes.
`ldapsearch -b sub` is a command used to perform an LDAP search with a base and subtree scope, but it does not optimize the underlying database or its indexes.
`make /var/lib/openldap-data/` is a file system command to create a directory, which has no function in optimizing LDAP searches.
The `slapindex` command is specifically designed to regenerate database indexes for an OpenLDAP backend. Well-maintained and up-to-date indexes are essential for accelerating LDAP search operations, especially in large directories, by allowing the server to quickly locate entries.
`slapd -r +20` is an OpenLDAP daemon startup option that sets a maximum number of requests for a connection or thread, which is related to resource management but not direct search optimization via indexing.
`slapd -instances=10 -f` is a `slapd` startup command to run multiple instances, which affects daemon architecture but not direct search optimization.
Concept tested: OpenLDAP database indexing for performance
Source: https://www.openldap.org/doc/admin24/slapindex.html
Topics
Community Discussion
No community discussion yet for this question.