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

ITS#2588 subinitial and subfinal indexes not working



>slapd.conf, index I'm using:
>index   cn,sn,mail      eq,subinitial,subany,subfinal

>I also tried with just "eq,sub", same results.

>searches being performed: string, *string*, *string and string*.
>"string" and "*string*" are very fast (<1s), while "*string" and "string*"
>are very slow (>10s).

The subinitial (and subfinal) index code only helps if the indexed strings
are unique within their first (or last) 4 characters. For the data you're
using, this condition doesn't apply; the majority of your entries all fall
into the same index slot and so they must be checked individually.

This same substring indexing logic has been in place for a long time, which
is why the same behavior is present in 2.0, 2.1, and probably even 2.2, in
all the  backend types that support indexing (back-ldbm, back-bdb, back-hdb).

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support