[erlang-questions] newbie question

Scott Lystig Fritchie fritchie@REDACTED
Fri Nov 30 06:36:16 CET 2007


>>>>> "ah" == Andreas Hillqvist <andreas.hillqvist@REDACTED> writes:

ah> I am uncertain if the index for item, gives keysort any
ah> performance gain.  Maybe some one else can answer this?

I'd guess not, but I'm just guessing: a fold will likely traverse the
entire table.

One sneaky thing you can do is toss in a mnesia:info() at the end of
your Mnesia txn-implementing function, then look at the top of the
report for locks that are being held (all of them by that transaction,
if there are no other Mnesia transactions running).  IIRC, fold
operations will take ___WHOLETABLE___ locks (or something looking
vaguely like that).  That's one way to answer the question ... is
Mnesia locking anything more/less than I expect it to?

-Scott



More information about the erlang-questions mailing list