<div dir="ltr">Mnesia is application database but general RDBMS. Mnesia is not optimized for works such as crunch thousands of rows and many joins for each. Application database means for example you can combine many different nontrivial tasks programed in application language (Erlang) in various ways with ability recursive including it in transactions. Mnesia is barely fast even you do complex tasks in reliable and maintainable fashion. You are able write your code in natural application way but you are still fast enough. You don't need make trade off readability and maintainability by performance or reliability and you gain all of this in distribute environment, partitioning, mirroring and so. If you start compare application using mnesia for many complex but not data expensive tasks with requirement of readability you found mnesia is light faster than classic RDBMS approach. If you need simple fast data intensive crunch, use classic RDBMS. If you need complex data non intensive and various tasks with distribution and reliability, use mnesia. That's all. Your task is nothing more than just relational data crunch. It is primitive from mnesia point of view and you don't use killer features of it.<br>
<br><div class="gmail_quote">On Tue, Sep 30, 2008 at 4:58 PM, <span dir="ltr"><<a href="mailto:Dana.RUBINO@rbs.com">Dana.RUBINO@rbs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hey all,<br>
<br>
I am doing some benchmarking with Mnesia at the moment and am pretty disappointed to say the least.<br>
<br>
I'm hoping I am doing something wrong.<br>
<br>
Running a 5 table join below: (two of the tables have ~50k rows the rest a couple of hundred)<br>
<br>
execute(qlc:q([I#i.user_id || I <- mnesia:table(i),<br>
C <- mnesia:table(c),<br>
I#i.user_id =:= C#c.user_id,<br>
I#i.group =:= "Group A",<br>
P <- mnesia:table(p),<br>
T <- mnesia:table(t),<br>
S <- mnesia:table(s),<br>
C#c.platform_id =:= P#p.platform_id,<br>
C#c.trans_id =:= T#t.trans_id,<br>
C#c.sales_id =:= S#s.sales_id<br>
])).<br>
<br>
On a normal RDBMS this query returns in < 1min. I am yet to get a result from Mnesia and its been running for 10 mins.<br>
<br>
Is there anyway I can see what's going wrong with this query under the hood?<br>
<br>
Thanks,<br>
Dan<br>
<br>
***********************************************************************************<br>
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.<br>
Authorised and regulated by the Financial Services Authority<br>
<br>
This e-mail message is confidential and for use by the<br>
addressee only. If the message is received by anyone other<br>
than the addressee, please return the message to the sender<br>
by replying to it and then delete the message from your<br>
computer. Internet e-mails are not necessarily secure. The<br>
Royal Bank of Scotland plc does not accept responsibility for<br>
changes made to this message after it was sent.<br>
<br>
Whilst all reasonable care has been taken to avoid the<br>
transmission of viruses, it is the responsibility of the recipient to<br>
ensure that the onward transmission, opening or use of this<br>
message and any attachments will not adversely affect its<br>
systems or data. No responsibility is accepted by The<br>
Royal Bank of Scotland plc in this regard and the recipient should carry<br>
out such virus and other checks as it considers appropriate.<br>
Visit our websites at:<br>
<a href="http://www.rbs.com" target="_blank">www.rbs.com</a><br>
<a href="http://www.rbs.com/gbm" target="_blank">www.rbs.com/gbm</a><br>
<a href="http://www.rbsgc.com" target="_blank">www.rbsgc.com</a><br>
***********************************************************************************<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--Hynek (Pichi) Vychodil<br>
</div>