[erlang-questions] Some mnesia oddity

Ben Hood 0x6e6562@REDACTED
Wed Oct 8 11:55:52 CEST 2008


On Wed, Oct 8, 2008 at 7:41 AM, Ben Hood <0x6e6562@REDACTED> wrote:
>> You do take a write table lock before your loop, right.
>> Because otherwise you loose a lot of roundtrip time, which
>> wasn't in the delete_object it only gets a lock on the {Tab,Key}
>> record.
> Are you suggesting that I get a lock on the whole table before I start
> iterating through it instead of just getting a record lock for each
> object on every iteration?
> If so, I'll give that a go and see what difference it makes.

I've just tried locking the whole table and it effectively doubles the
rate of deletion when looping through the table and deleting records
based on their keys.

Now I need to consider whether a full table lock is acceptable for my
particular application, but at least I now know what effect the
different ways of deleting records from mnesia have.

Thanks for your help,


More information about the erlang-questions mailing list