[erlang-questions] Mnesia - select with placeholder in table key

John Doe donpedrothird@REDACTED
Sun May 26 22:46:20 CEST 2013

If I use select when the key is tuple with placeholders, something
like this (taken from erlang docs and changed a bit):

MatchHead = #person{name = {'$1', "K", "Jameson"}, sex = '$2', _ = '_'},

Result = '$2',

mnesia:select(Tab,[{MatchHead, [], [Result]}])

 where name is the table key

will mnesia do full table scan in this case? Or it will be smarter and
select all records with key matching {_, "K", "Jameson"} using index
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130527/c086e0e4/attachment.htm>

More information about the erlang-questions mailing list