Processing Large Mnesia dbase

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Tue Nov 29 18:00:39 CET 2005


You need to place the call to mnesia:foldl() from
within a fun passed to either mnesia:activity() or
mnesia:transaction(). If you use 
mnesia:activity(Type, Fun), then Type can be either
of the valid types (ets, async_dirty, ..., sync_transaction.)

Example:

mnesia:activity(
   transaction,
   fun() ->
           mnesia:foldl(fun(X,Acc) -> [X|Acc] end, [], Tab)
   end).     
 

/Uffe

> -----Original Message-----
> From: owner-erlang-questions@REDACTED 
> [mailto:owner-erlang-questions@REDACTED] On Behalf Of 
> tty@REDACTED
> Sent: den 29 november 2005 16:56
> To: Bengt Kleberg (AL/EAB)
> Cc: erlang-questions@REDACTED
> Subject: Re: Processing Large Mnesia dbase
> 
> Unfortunately I get a 
> 
>                ** exited: {aborted,no_transaction} **
> 
> when running mnesia:foldl.
> 
> I concur it would be great to hear folks with large mnesia 
> experience on this matter.
> 
> Thanks
> 
> t
> 



More information about the erlang-questions mailing list