Hi,
If I issue an ldapsearch for groups with a filter of "(&(description=<description>)(|(member=<memberDN>)(memberUid=<memberName>)))" and have the following indexes
olcDbIndex: member eq olcDbIndex: memberUid eq olcDbIndex: description eq
Will openldap be able to use these indexes for this search, or do I have to add a composite index? What might that look like for specifically optimizing this query?
Thanks for the consideration.
thomaswilliampritchard@gmail.com wrote:
Hi,
If I issue an ldapsearch for groups with a filter of "(&(description=<description>)(|(member=<memberDN>)(memberUid=<memberName>)))" and have the following indexes
olcDbIndex: member eq olcDbIndex: memberUid eq olcDbIndex: description eq
Will openldap be able to use these indexes for this search,
Yes
or do I have to add a composite index?
No
What might that look like for specifically optimizing this query?
Thanks for the consideration.
Thanks for the response Howard.
Will the openldap search filter logging contain information about query plans / work?
Could I expect better performance using a composite index with higher cardinality first where assuming description was the same on 90% of groups and then I add indexes such as
olcDbIndex: member,description eq olcDbIndex: memberUid,description eq
Thanks for the consideration
thomaswilliampritchard@gmail.com wrote:
Thanks for the response Howard.
Will the openldap search filter logging contain information about query plans / work?
There are no compound indices nor query plans. This is not an RDBMS.
Okay thanks for the information.
Re-reading the docs I mistakenly thought
olcDbIndex: member,description eq would create a compound index with those two fields, but it appears it is actually equivalent to
olcDbIndex: member eq olcDbIndex description eq
openldap-technical@openldap.org