diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-06-01 22:03:20 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-06-01 22:03:20 +1000 |
commit | 73c8566d957af8c823a48912b66aae71b002259b (patch) | |
tree | e97cbb3a12dc703cc20091c592e7c8122544aa8b /README | |
parent | a0edb50552090341760c9dfcf27a71df8100e1a5 (diff) | |
download | samba-73c8566d957af8c823a48912b66aae71b002259b.tar.gz samba-73c8566d957af8c823a48912b66aae71b002259b.tar.bz2 samba-73c8566d957af8c823a48912b66aae71b002259b.zip |
use the unique flag on ldb attributes to optimise & clauses
When a attribute is marked unique we know that if we find a match
it will be the only possible match. This means that in a list of
subtrees connected by an &, it is best to first load the index values
for the unique entries, as if they find something then we know we
won't have to look any further.
This helps with searches like this:
(&(objectclass=user)(samaccountname=tridge))
the old code would first have loaded the very large index for the
objectclass=user attribute, and then loaded the single entry for
samaccountname=tridge. Now we load the samaccountname=tridge entry
first, notice that it gives us a single result, and stop, thereby
skipping the load of the objectclass=user index record completely.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions