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

Re: How indexes used with search



Roman Rybalko wrote:
25.09.2012 14:57, Roman Rybalko ÐÐÑÐÑ:
Also it's not clear for me how objectID set is determined when there
is search on "one" scope? The same when "sub" scope cover not the full
database contents but a part of the object tree (suffix: cn=test,
search base: cn=test1,cn=test)? I thought that search with base
covering not the full backend suffix (but a partial tree) should work
faster, but seems this is not true, even overhead introduced by
additional objectID set. Right?
Howard, can you explain it please?

The scope is just another set, yes. It must be ANDed with the index sets. Searches with subtree scope over the entire database use a shortcut, instead of reading a scope set we just use a fake set representing all IDs. Searches over any other scope cannot take any shortcut.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/