[erlang-questions] Mnesia questions

Chris Hicks silent_vendetta@REDACTED
Tue May 18 01:32:16 CEST 2010


First off thank you to everyone who responded publicly and privately. I do have a couple more specific ones about Mnesia and fragmented tables (yes, more of THOSE questions).
1) Well my first question is actually about tables in general. When one inserts/deletes a record/row from a table, is the whole table locked(didn't see this anywhere but could have missed it)?
2) I understand the general concept behind fragmented tables, and the answer to the above question may render part of this moot, but what are the performance pros/cons for using fragmented tables? I don't mean disk space but read/writes which occur mostly in transactions. Is each one any slower? Is there any advantage in parallelization?
2a)If a whole table is locked for an update does that just mean (hopefully) that the specific fragment of the larger table would only be locked, meaning a 50 fragment table could have 50 different locks/writes going? Of course if a whole table is not locked for an update that doesn't matter.
One of the data requirements for my project is that one "person" record will be associated with possibly as many as 1000 "item" records. Lets take a possible person population of 10,000, meaning there could be as many as 10M item records. I want to keep each record small as I will be accessing different parts of a whole "object" at different times and will only need one or two small pieces of data at a time. One of the ways, and some of this is going to rely on the answers above, I was thinking of doing this was setting up a bag type table and associating all of those items (because they will be different) with the same key, the id of the person record. The one thing I'm wondering about, however, is some of these items might be in table fragment 1 and others in fragments 13, 27 and 42 (as far as I understand it) and I was wondering how much of a problem this would create as far as performance.
Having each item with a different primary key, with each key held in a field in the person record, would mean I have a ton of queries if I want to get detailed info about each item and that doesn't work for me. Is there another approach that would be better that I am not thinking of? 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1


More information about the erlang-questions mailing list