ordered_set and range queries
Garrett Smith
g@REDACTED
Sat May 8 19:21:17 CEST 2010
I'm playing around with the performance characteristics of using
type=ordered_set in mnesia.
My record looks like #test{time, val} where time is an integer
timestamp (e.g. epoch milliseconds).
When I run this:
mnesia:dirty_select(test, [{{test, '$1', '$2'}, [{'>=', '$1', Start},
{'=<', '$1', End}], [['$1', '$2']]}]]
I get the same basic timings regardless of the result set size. I.e. I
suspect there's a full table scan in every case.
Just to verify, I ran the same tests on a type=set table and got the
same basic timings.
Is there a way to perform that select that takes advantage of the sorted key?
Garrett
More information about the erlang-questions
mailing list