s4/dsdb-schema: Index attributes on msDS-IntId value
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 18 Jun 2010 21:00:08 +0000 (00:00 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Sun, 20 Jun 2010 23:57:55 +0000 (02:57 +0300)
commit267645ca55f7825e87a098c9dc51f132aac1f452
tree53aed64981161a0625ffa9fcab5bd0376e470dda
parentecbe9a74c6757415720657fbd3ba207989b47848
s4/dsdb-schema: Index attributes on msDS-IntId value

O(n) search for dsdb_attribute by msDS-IntId value was
replaced by binary-search in ordered index.

I've choosen the approach of separate index on msDS-IntId values
as I think it is more clear what we are searching for.
And it should little bit faster as we can clearly determine
in which index to perform the search based on ATTID value -
ATTIDs based on prefixMap and ATTIDs based on msDS-IntId
are in separate ranges.

Other way to implement this index was to merge msDS-IntId values
in attributeID_id index.
This led me to a shorted but not so obvious implementation.
source4/dsdb/schema/schema.h
source4/dsdb/schema/schema_query.c
source4/dsdb/schema/schema_set.c