[Date Prev][Date Next]
Re: equality indexing
> If we used a Btree for the attribute indexes, and used the actual attribute
> value (instead of the hash that we use now) for the key, we could use BDB's
> Range feature to do >= indexing as well as equality. (I'm not sure we get <=
> indexing out of this, haven't thought it all the way through yet.)
One way to achieve the general inequality matching in the btree access method
would be to have a rather sophisticated bt_compare_fcn and to give special
prefix to the asserted value argument to it. If bt_compare_fcn can behave
differently according to the prefix, then it would be realized to provide arbitrary
inequality matching if the corresponding behavior is implemented in bt_compare_fcn.
> As a compromise, we can use a "prefix" with the hash appended. E.g., use the
> first 4 bytes of the actual attribute value, plus the current equality hash.
> That way our equality lookups are still reasonably compact, and still
> unambiguous, but we also have a means for doing loose ordering indexing.