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

Re: performance - how to index for most performance

christian gattermair writes:
> what do i have to index for best performance: each field or everything
> in a line.

If you mean whether to give slapd.conf one index line with all indexed
attributes or several index lines with fewer attributes, it makes no
difference.  What counts is which indexes you give to which attributes.

Indexing anything makes modifications that involve that attribute a bit
slower, and can make searches for that attribute much faster.  If you
have search filters like (foo=x) and (&(foo=x)(bar=y)), but never
(bar=y) without a search for foo, you may not need to index bar.  If the
(foo=x) search never returns many entries, then it won't take the server
much time to check which of these entries also match (bar=y).

> index   default pres,eq

Personally I dislike 'default' indexing, I always spell it out for each
attribute, but that's just me:-)

> index   objectClass,uid,uidnumber,gidnumber,cn

A 'pres' index is pointless for objectClass, since (objectClass=*) is
TRUE for all entries.  I think the index will actually slow the search
down a bit, since the server will use some time to perform the index
lookup even though that won't filter out any entries.