[erlang-questions] Extremely poor Mnesia performance

Dana.RUBINO <>
Tue Sep 30 18:23:46 CEST 2008

Thanks Taavi,

That wasn't the answer I was looking for! :-D

Oh dear, well that leaves my plan for using Mnesia in tatters.

I actually need an in memory db which at least has the core subset of RDBMS features. So I am essentially just looking for a small in memory DB for real-time access.

Has anyone here had any experience using something like KDB with Erlang?

Perhaps I could switch to using KDB as an alternative?

Many Thanks,

-----Original Message-----
From: Taavi Talvik [mailto:]
Sent: 30 September 2008 17:19
Subject: Re: [erlang-questions] Extremely poor Mnesia performance

On Sep 30, 2008, at 5:58 PM, <> wrote:

> Hey all,
> I am doing some benchmarking with Mnesia at the moment and am pretty
> disappointed to say the least.
> I'm hoping I am doing something wrong.
> Running a 5 table join below: (two of the tables have ~50k rows the
> rest a couple of hundred)

Probably you are not doing anything wrong. From mnesia introduction (http://www.erlang.org/doc/apps/mnesia/
it design goals are:
In telecommunications applications there are different needs from the features provided by traditional DBMSs. The applications now implemented in the Erlang language need a mixture of a broad range of features, which generally are not satisfied by traditional DBMSs.
Mnesia is designed with requirements like the following in mind:

        * Fast real-time key/value lookup
        * Complicated non real-time queries mainly for operation and maintenance
        * Distributed data due to distributed applications
        * High fault tolerance
        * Dynamic re-configuration
        * Complex objects

Mnesia is not designed as replacement for relational database. It is optimised for fast key-value lookup and distribution.

With qlc:info(Qh) you can get more information, how query is actually handled.

best regards,

The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority 
This e-mail message is confidential and for use by the 
addressee only. If the message is received by anyone other 
than the addressee, please return the message to the sender 
by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The 
Royal Bank of Scotland plc does not accept responsibility for 
changes made to this message after it was sent. 

Whilst all reasonable care has been taken to avoid the 
transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this 
message and any attachments will not adversely affect its 
systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry 
out such virus and other checks as it considers appropriate. 
Visit our websites at: 

More information about the erlang-questions mailing list