Fragmented tables in Mnesia
Thu Jul 10 14:39:40 CEST 2003
From: "Hakan Mattsson" <hakan@REDACTED>
> As alternative to insert tons of calls to your own activity function
> myDbLib:activity(Kind, Fun), you could start by using the normal
> Mnesia API. Later when you feel a need of it, you can change the
> Mnesia access_module configuration parameter to some customized
> access callback module (mnesia_frag, rdbms, my_own_callback...)
> without doing any changes to your old code.
True. I'd still opt for the access library approach, but most likely not
just one, but one per (loosely put) category. It still leaves some
additional options, e.g. that you can easily change semantics from
transaction to synch_transaction, if stress test indicate that you get
better characteristics that way. This of course assumes that the
access library function wraps the "activity kind" parameter, and
doesn't let that leak out of the access API. For a given category
of data, you'd probably not want to mix different activity kinds anyway.
There are other tricks one can pull with a private access API, for
example during tricky upgrades, but that's a whole different story.
A matter of programming preferences, perhaps.
More information about the erlang-questions