mnesia, large datasets and key range lookups

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


> Telemetry data from one of the Rosetta instruments :)

Lo, a fellow spaceman :-)

> Hmm, I could use tuples in the list, like this [{NCSA0005, Value},
> {NCSA0010, Value2}, ...]. That could be scanned pretty easy with
> lists:keysearch. On the other hand, mnesia does that to me, see below.

lists:keysearch is exactly what I was implying ....

> [..]
> It's not an ordered set, but a bag.

Yes, but if you put all the parameters for one timestamp into one record, and
have a key which is only the time, then it COULD be an ordered set, with all the
advantages that brings. That's effectively what our archiving systems do here,
for exectly the performance reason you're investigating (of course, and
unfortunately, our systems are not implemented in Erlang -- maybe one day I can
change that!).


> And yes, like you thought, I do need the other parameters real soon

Then it's sensible to grab them all in one mnesia access anyway.

N.





More information about the erlang-questions mailing list