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

Re: How Indexes work?

Steeg Carson:
2010/12/17 Bjørn Ruberg<bjorn@ruberg.no>:
Steeg Carson:

I have a database, and my search is like shown above. The search takes

Did you run slapindex after adding the index? Is the index file owned by the
proper user account?

You didn't answer the above question...


But what I see, is that the write IO from LDAP is enormously (seen
with iotop). During the whole search, the write IO is higher than the
read IO.

What is slapd's current loglevel?

loglevel is 0
I know, I should better use 256, but for this reason, I did switch off
logging :-( for testing.

I asked because you said there's much *write* activity. If there's no logging, something else must be writing and you should find out what it is. This is probably the reason why the search is slow.


But what about the first part of my question. in this Posting. How
will be a ldapsearch processed?
Does the slapd, search the whole database despite of indexes?

I'm no authority on this, but generally the main purpose of using indexes is -not- having to do a full scan. This will of course require that the index has been properly built (se above).

If your original statement is still correct - that is, you've built an "eq" index (equality, exact match) and you search for the exact value - the index should have made a difference.

However, if you've built an equality index and then search for a substring, the index will not speed it up.

As a side note, you should be aware that while most attributes can be indexed with "eq", some attributes won't allow substring indexing.

Hope this helps.