[Date Prev][Date Next] [Chronological] [Thread] [Top]

subinitial and subfinal indexes not working?

I'm running an instance of openldap-2.0.27 and it seems that the
subinitial and subfinal indexes are not working.

All for searches correctly return the same 4 entries, but with
varying degrees of speed (the database contains about 170k entries):

# time ldapsearch cn="jose roberto silva" > /dev/null
real    0m0.108s
user    0m0.010s
sys     0m0.000s

# time ldapsearch cn="*jose roberto silva*" > /dev/null
real    0m0.123s
user    0m0.010s
sys     0m0.010s

cn is indexed as follows:
index   cn              eq,subinitial,subany,subfinal

I had "sub" earlier, same result.

Now, the following two searches take minutes to complete:

# time ldapsearch cn="*jose roberto silva" > /dev/null
real    1m49.929s
user    0m0.010s
sys     0m0.010s

# time ldapsearch cn="jose roberto silva*" > /dev/null
real    1m49.940s
user    0m0.020s
sys     0m0.010s

Seems there is a problem with the subinitial and subfinal indexes, any
hints? I *think* this also happens with openldap-2.1.21, but I'll try
again later just to be sure.