Howard Chu wrote:
> chrichardso27(a)gmail.com wrote:
> >  Hi,
> >  
> >  Considering the following assumptions;
> >  
> >  - OpenLDAP version 2.4.51
> >  - attributes objectClass and abc are indexed based on equality
> >  - the EQUALITY of attribute abc is based on distinguishedNameMatch
> >  - The database contains roughly 2 million entries
> >  - 2 entries have defined the attribute abc with a dn value cn=foo,dc=bar 
> > and
> > objectClass=someClass
> >  - 2 entries have defined the attribute abc with a dn value cn=bar,dc=baz 
> > and
> > objectClass=someClass
> >  
> >  Now, the issue started with really slow search performance using 
> > objectClass=someClass
> > & abc=cn=foo,dc=bar as filter criteria. Debugging a while seems to indicate 
> > that the
> > objectClass filter returns roughly 2 million entries as candidates.  
> If the objectclass filter returns so many candidates, it's not really doing 
> much good.
> What is the
> result using only the (abc=DN) filter?

Search with filter "(abc=cn=foo,dc=bar)" returns close to the amount of entries 
in the database (2M) as candidates, and is somewhat equally slow than 
"(&(objectClass=someClass)(abc=cn=foo,dc=bar))", around 15 seconds.

However, search with filter "(abc=cn=bar,dc=baz)" returns a subset of the index 
of abc and performs reasonably fast (1-2 seconds).

This is rather weird and I have no clue on what might be causing the issue.

Reply via email to