Fwd: Undirect index update

Chris Muller ma.chris.m at gmail.com
Tue May 19 22:32:06 UTC 2009


I only meant to caution about the limited scale associated with
duplicate keys in a MaHashIndexes.  As duplicate keys accumulate it's
a worst-case, O(n) linear search for adds, removes AND reads.

It may be tempting to add index on the #color of millions of objects.
Which might be worthwhile there are 24-million possible colors, but if
only 8 of those colors are used then, as one-million objects are added
to that collection, the minimum number of collisions at each key is 1M
/ 8..  Access to this index is now slow and will continue to worsen as
more duplicates are added..

Perhaps you are not doing this anyway, and please ignore my ramblings
if that is the case.

 - Chris

> Oh, not one thousand members for an index, but from a few unit to
> several tenths.
> Hum, why should I have hash-collisions if my indexes produce unique
> indexing values?
>
> I was believing index value is used as a sort of key to a dictionary
> whose values are the indexed objects (classification members)
>
>
> Best,
>
> Hilaire
>


More information about the Magma mailing list