directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernst Bech <>
Subject Antwort: Re: [ApacheDS] Slow search for a string starting with "*"
Date Mon, 24 Mar 2014 15:26:54 GMT
I have done a search for an unindexed attribut, another search for an 
unindexed attribute starting with a "*" and a search for an indexed 
attribute starting with a "*".
All three took abount 5 secs on my hardware.

So these test results seem to prove that the index is not used at all as 
you pointed out. Will this have a chance to be improved later?
OpenLDAP has the ability to configure an index as substring index which 
improves also searches starting (not only ending) with a "*" drastically.
Is this possible which ApacheDS too?

I found a checkin which could be related.
Did this only speed up the search ending with the "*" cause these ones are 

With regards

Ernst Bech

Von:    Emmanuel Lécharny <>
Datum:  21.03.2014 17:50
Betreff:        Re: [ApacheDS] Slow search for a string starting with "*"

Le 3/21/14 5:18 PM, Ernst Bech a écrit :
> I'm using ApacheDS 2.0.0-M16.
> I made "cn" an index, imported my own schema and then imported a bunch 
> data (4000 entries) based partially on the own schema.
> After importing was finished I did a number of searches. The searches 
> "(cn=foo)" and "(cn=foo*)" were very fast (msecs) as expected but the 
> search for "(cn=*foo)" was very slow (seconds).
> Is this a known issue or can it be improved?
This is a known issue. Also it should not take seconds.

The rational is that substring searches are done by doing a full scan
(ie, each entry is being read, and the cn attribute will be compared to
the filter).

With 4000 entries in your base, it should take less than a second.

Emmanuel Lécharny 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message