mnesia, large datasets and key range lookups

Nigel.Head@REDACTED Nigel.Head@REDACTED
Tue Jul 13 11:13:32 CEST 2004


>   make_key(#time_parameter{time=T, parameter=P}) ->
>      {T, P}.N.

While I'm not exactly sure what the exact application is, the original post said
there might be upto about 30 parameters at any given time. Why is it strictly
necessary to have the parameter itself as part of the key. I would go for making
the record contain the time (as a key) and a list of parameter values for that
time. The list can be variable length, of course.

This would reduce the number of records by some factor of 10 or so; locating the
specific parameter you're after would then be some sort of application level
list search -- didn't ought to be too expensive for a list of max 30 long.
Chances are you'll be needing other parameters from the same time real soon in
your processing anyway.

Regards,
N.





More information about the erlang-questions mailing list