[erlang-bugs] All keys in the same slot (Mnesia/dets)

Erik Søe Sørensen ess@REDACTED
Tue Jun 7 10:00:52 CEST 2011


Igor Ribeiro Sucupira wrote:
> Hum... mnesia_frag_hash and dets both use phash2, so it makes sense
> that the keys are poorly distributed among the slots of each dets
> table that is a disc_only_copies fragment.  :-(
> I guess we'll have to deal with that somehow.
>   

I needed two independent hash functions at some point, and noticed that 
phash2(X) and phash2({X}) appear to be independent.
Is that a good way to achieve independent hash functions?
And is it applicable in this situation?

Ergards,
Erik Søe Sørensen




More information about the erlang-bugs mailing list