[erlang-bugs] All keys in the same slot (Mnesia/dets)
Igor Ribeiro Sucupira
igorrs@REDACTED
Wed Jun 8 21:48:01 CEST 2011
Copying erlang-questions.
BTW, I'm still trying to understand why some fragments ended up with
many more slots after the upgrade I described in the original post.
Is there a way to manually raise the number of slots in a dets table?
I guess I'll have to do that now.
Thanks.
Igor.
On Tue, Jun 7, 2011 at 1:12 PM, Igor Ribeiro Sucupira <igorrs@REDACTED> wrote:
>
> I know I can use another module instead of mnesia_frag_hash (and we have
> tables that don't use it).
>
> But it's too late now. I don't see a way to do that without much pain. The
> cheapest approach I can think of is to create other tables, change the code
> to use both versions of each table and then migrate the data. It will take a
> month. :-(
>
> Changing dets would be less painful, but I don't know if it's "doable".
>
> Is this pitfall with table fragmentation documented anywhere?
>
> Thanks.
> Igor.
>
> Em 07/06/2011 05:01, "Erik Søe Sørensen" <ess@REDACTED> escreveu:
>
> 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