directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: Re: Antwort: Re: [ApacheDS] Slow search for a string starting with "*"
Date Thu, 17 Jul 2014 12:25:48 GMT
I have practically just ran into this issue and found that the
DefaultOptimizer is
returning Long.MAX_VALUE for substring searches starting with "*"

Ideally when the given attribute has a index then we should just consider
the size/count
of the index, this results in better performance gain than when the
Long.MAX_VALUE
is used.

I will commit this fix.

otoh, I was able to gain 10x speed by configuring the
ads-partitioncachesize property to
a sufficiently high value w.r.t the total size of the partition
(effectively keeping many entries
in memory to avoid deserialization)

On Mon, Mar 24, 2014 at 11:14 PM, Ernst Bech <Ernst.Bech@caseris.de> wrote:

> Ok I just did :)
>
> DIRSERVER 1965
>
> I hope I didn't mess up too bad ;)
>
> With regards
>
> Ernst Bech
>
>
>
> Von:    Emmanuel Lécharny <elecharny@gmail.com>
> An:     users@directory.apache.org,
> Datum:  24.03.2014 17:45
> Betreff:        Re: Antwort: Re: [ApacheDS] Slow search for a string
> starting with "*"
>
>
>
> Le 3/24/14 4:26 PM, Ernst Bech a écrit :
> > 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?
>
> This is defitively possible, and I would say it's easy to implement :
> it's just a matter to create an index of the reverted value.
>
> How does it work ? Let's say you add a value MY-TEST for the CN
> attribute. The normal CN index will refer to TEST, when the reverse
> index will refer to TSET-YM. Now, looking for *TEST is just searching
> the reverted index for TSET*.
>
> We have discussed this feature lengthly for years, but never decided to
> implement it up to now.
>
> It woul be cool to create a JIRA proposing to add this feature.
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
>


-- 
Kiran Ayyagari
http://keydap.com

Mime
View raw message