[erlang-questions] mnesia bags vs sets containing lists

Evans, Matthew mevans@REDACTED
Fri Mar 18 16:08:10 CET 2011


For the most parts you're probably not going to notice much between the two.

What I have noticed with tables of type bag is when the bag gets large then the performance will really slow down, especially on inserts. 


-----Original Message-----
From: erlang-questions@REDACTED [mailto:erlang-questions@REDACTED] On Behalf Of Dave Challis
Sent: Friday, March 18, 2011 11:03 AM
To: erlang-questions
Subject: [erlang-questions] mnesia bags vs sets containing lists

Assuming I wanted to store some simple data structures in mnesia, of the 
form:

{Key, [A, B, C, D, E, ...]}.

in which I don't care about the ordering of the list.

What would be the advantages/disadvantages of storing it using:

a) a table of type set, storing/retrieving the whole list at once, and 
operating on the list to get specific elements

b) a table of type bag, storing/retrieving individual values using mnesia

I'm just trying to get a feel for the differences in the above two 
implementations, rather than having any concrete use in mind.

Thanks,

-- 
Dave Challis
dsc@REDACTED

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED



More information about the erlang-questions mailing list