: [erlang-questions] Mnesia 25MB database takes 15min to load

Allan Merolla <>
Fri Oct 9 02:21:24 CEST 2009


Thank you very much guys.

You were correct. I added a second index on time which was slowing things to a crawl on load. I removed the index and things were great again. I didn't really understand what was happening until I switched to a disc_only_copies table and saw that there was a second table called keyVal_3 the number 3 was generated by mnesia to represent the additional index I specified. I'm not sure why it generates this on load for the memory resident version of the table but that was definitely the cause.

Now I'm trying to figure out what's better a disc_only_copies table with an additional index or disc_copies without.

Appreciate your help with this and apologize for my noobiness =).

Cheers

Allan

-----Original Message-----
From: Roberto Aloi [mailto:]
Sent: Thursday, 8 October 2009 9:13 PM
To: Allan Merolla
Cc: ''
Subject: Re: [erlang-questions] Mnesia 25MB database takes 15min to load!!!

Hi Allan,

you might want to have a look to this thread on Trapexit:
http://www.trapexit.org/forum/viewtopic.php?p=44433

Regards,

Roberto Aloi
Erlang Training and Consulting Ltd.
http://www.erlang-consulting.com
http://aloiroberto.wordpress.com

Allan Merolla wrote:
> Hello All,
>
> I am currently using mnesia to store simple records consisting of {ID,Time,Value}. The purpose of the database is simple. High availability of large amounts of "simple data". I have inserted 500 thousand records and the DCD is 24mb. When I do a mnesia:stop() and start() it takes over 10min just to load the test data. I originally had planned to have this fragmented and have at least 200mb per fragment but at 10min load for 25mb the whole idea seems impossible now as it would take over 2hours to start a node. I find it hard to believe this is by design? Can anyone tell me what I am doing wrong?
>
> Thanks in advance folks.
>
> Cheers,
> Allan
>
>
>
>




More information about the erlang-questions mailing list