[erlang-questions] Some mnesia oddity

Ben Hood 0x6e6562@REDACTED
Tue Oct 7 19:31:56 CEST 2008


Hey Ulf,

On Tue, Oct 7, 2008 at 2:30 PM, Ulf Wiger (TN/EAB)
<ulf.wiger@REDACTED> wrote:
> On replicated tables, using dirty writes or deletes for batch
> updates can easily be _less_ efficient (and considerably less
> safe) than using transactions.
>
> The reason is that, if you take a table lock, the overhead
> for starting the transaction, acquiring the lock and
> committing (where all operations are included in the
> commit message), becomes insignificant at some point,
> compared to the combined overhead of making an rpc
> call for each single operation.

This is a very valueable insight, because the tables are actually replicated.

The performance I get from the iterating through the table and
deleting based on key is less performant than they wildcard option
I've been using until now, but it is not unacceptably slower, and is
also not using a bug as a feature, so I will go for this option.

> Of course, if confronted, I'll deny that
> I ever wrote this. ;-)

:-)

Ben



More information about the erlang-questions mailing list