[prev in list] [next in list] [prev in thread] [next in thread] 

List:       erlang-questions
Subject:    [erlang-questions] newbie question
From:       fritchie () blanked ! org (Scott Lystig Fritchie)
Date:       2007-11-30 5:36:16
Message-ID: 200711300536.lAU5aGx8013264 () snookles ! snookles ! com
[Download RAW message or body]

>>>>> "ah" == Andreas Hillqvist <andreas.hillqvist> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic