Updating an index

Brent Pinkney brent at zamail.co.za
Sat Mar 15 21:00:02 UTC 2008


> I don't get your point. Do you mean I might divide the collection (once) so
> half of the objects are in "true state" and the others in "false state"?
> That's not possible, since I have many state conditions for one single
> object. Even if I had only one state, it's not very confortable to divide
> things that are thougth as bound. I'd have to consider that this particulars
> objects are divided in two, while others are not.
> Or do you mean,have to persist the objects in different collections, each
> pair of collection correspoding to a true-false condition.?
> I think this is not very nice. And the problem of the singularity of one
> kind of objects persists.

Magma's indices are based on integer hashes: all objects who index attribute has the same value will have the same hash value.
At this point, finding the object in the index becomes a linear search.

By definition boolean object hash to on of two values, 0 or 1

I managed to minimise the impact of this restriction by hashing false to the range 0 - 32767 and true to 32768-65535.
Finding object was no quicker, but inserting object was much, much quicker.

Brent


More information about the Magma mailing list