Mnesia:select/4

Evans, Matthew <>
Tue Jun 16 05:34:47 CEST 2009


I appear to have answered my own question. It is significantly slower.

I had to add an extra record that let me bound my search. Maybe this is something to add as a request to the Eralng team; the ability to force the number of records returned from mnesia:select/4, without having to get mnesia calculate the continuation.
________________________________________
From:  [] On Behalf Of Evans, Matthew []
Sent: Monday, June 15, 2009 10:42 AM
To: 
Subject: [erlang-questions] Mnesia:select/4

Hi,

I want to use mnesia:select/4 to select a limited range of records.

The Guard looks like:

Guard = [{'>=','$8',NPT}],

I can always place a lower limit on the guard, but not an upper limit. So my thought of using select/4, with a number of results of 1 should work (i.e. it'll return the next highest match).

My worry is how efficient is it if it'll produce lots of continuation data?

The access methods are dirty.

Thanks

Matt


More information about the erlang-questions mailing list