Mnesia Query Performance

Rob Harrop <>
Thu Mar 10 16:02:43 CET 2011


I've been doing a bit of tuning on our use of mnesia in RabbitMQ and I'm 
a bit puzzled by the fact that read performance in transactions appears 
to be quadratic (or worse).

I ran a test in which I do only reads (no writes, no matching) on both 
set and ordered_set tables. From the results, it is clear that 
transaction execution time does not increase linearly:


Here the second slot in each tuple is the number of reads and the third 
slot is tx execution time in milliseconds.

I have attached the test code.

Am I doing something horribly wrong, or is this expected behaviour? If 
this is expected behaviour are there are known/accepted workarounds?

Kind Regards,

Rob Harrop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtest.erl
Type: text/x-erlang
Size: 1059 bytes
Desc: not available
URL: <>

More information about the erlang-questions mailing list