[erlang-questions] Some mnesia oddity

Ulf Wiger ulf@REDACTED
Tue Oct 7 22:36:10 CEST 2008


Ok, so a good rule of thumb: Don't use dirty updates on replicated
tables.

http://www.erlang.org/pipermail/erlang-questions/2006-February/019092.html

BR,
Ulf W

2008/10/7 Ben Hood <0x6e6562@REDACTED>:
> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list