[erlang-questions] ets:lookup() versus mnesia:ets()

Paulo Sérgio Almeida psa@REDACTED
Thu May 10 20:24:21 CEST 2007

Ulf, thanks for the prompt reply.

Ulf Wiger (TN/EAB) wrote:
> Hi,
> Sure, it has been done. You seem to be aware of 
> the drawbacks.

Do you mean, that apart from being bad software enginnering, it will be 
as safe as using mnesia:ets/1, if mnesia keeps using ets for its 

> mnesia:ets(fun/0) was created to avoid this very
> thing, assuming that it wouldn't matter for most
> people that it'd cost a couple of micros extra.

I see.

> Even better than mnesia:ets/1 is to use 
> mnesia:activity(Type, fun/0),
> where Type can be set to ets, async_dirty, sync_dirty,
> etc., giving you a wider array of dirtiness to choose
> from.

Ok. Btw, I tested mnesia:activity(ets, ...) but the runtime is similar 
to mnesia:ets, even a bit slower (5 microseconds instead of 4).


More information about the erlang-questions mailing list