Mnesia and Memory question
Rudolph van Graan
rvg@REDACTED
Mon Jan 3 09:03:51 CET 2005
Hi Casper,
some suggestions below
> I'm currently studying Erlang Mnesia database. Could any of you please
> advice me regarding below questions?
>
> 1. When I created disc_copies table, the full table resides in the memory as
> well. Due to this, if I load about millions of records, the memory
> utilization is far too great (few Giga bytes). For a HLR, SMSC kind of
> system, is this a good practice?
As you've pointed out, use disc_only tables for this.
> 4. To maintain CDRs, can I use disc_only tables of Mnedia?
In my experience, it is best to keep this type of data externally (In a
standard SQL database). The reason for this is that most queries (as in
mnemosyne or select in mnesia) result in a table scan that usually reads
every record. It *is* possible to define indices, but they are rarely as
efficient as a dedicated databases. We have experimented with the logging
of CDR's in mnesia, postgresql and mysql. Of these, we've had the best
results with mysql, requiring almost no maintenance and highest uptime.
We've used the erlang ODBC application as interface, running Gentoo linux.
Hope that this helps :)
Regards,
Rudolph van Graan
Pattern Matched Technologies
http://www.patternmatched.com
More information about the erlang-questions
mailing list