[erlang-questions] Mnesia record count

Maarten Engelen <>
Tue Nov 27 11:19:55 CET 2007


2007/11/27, Sean Hinde <>:
> There is some support for this style of query built into ets via
> ets:select_count(Tab, MatchSpec).
>
> New features in ets have traditionally taken a while to get into
> mnesia, but if your table is disc_copies (or ram_only) then you could
> use this call directly onto the ets backing store of the mnesia table.
> This assumes of course that your query can be expressed as a match spec.
>
> Also it would be worth badgering the OTP guys to bring this very
> useful feature up to the mnesia API
>
> Sean
>

I would have to look into the match specification documentation to see
if that's a possibility. I agree it would be a very nice feature to
have in the mnesia API. I actually couldn't really believe at first
there wasn't anything in mnesia that would allow me to do that.

Maarten.



More information about the erlang-questions mailing list