[Date Prev][Date Next]
Re: slow queries with long strings in filters
On Thu, Nov 09, 2006 at 03:34:38PM +0100, Sylvain Amrani wrote:
> Hi list,
> I've got an attribute that could contains very long strings (more than
> 150 chr).
> It's a string made of small tokens separated by spaces and slashes :
> departmentUID: BA/BAC ANDL/BAPZ IDF/GRPT YVLN/CIE GN ST GERM...
> The attibute is indexed with pres,eq,sub
> When I search for small substrings like (departmentUID=*/GRPT*) it's
> fast and ok.
> When I search for a long subset of the string, the query is _very_ long
> (many seconds) :
> (departmentUID=BA/BAC ANDL/BAPZ IDF/GRPT YVLN/CIE GN ST*)
The substring index is not generated for long strings. Check these in
In the end, you may be better off spliting that big string in
multivalued attributes perhaps or somethine else.
> Using subinitial or subany in the index slap.conf parameter did not
> solve the problem.
> I found only one post in the archives related to a server were any query
> string with more than 3 characters makes slow answers. He was told to
> adjust :
> But theses parameters are only available with openldap 2.3 and it
> doesn't seem to be exactly my problem (I've no differences between 2,3,4
> or 5 characters query strings)
Defaults may have changed. In earlier versions, this was a compile time