[erlang-questions] Mnesia record count
Mon Nov 26 23:47:44 CET 2007
Currently I'm building an application that needs to do a lot of record
checking by counting the number of records in a mnesia table based on
some condition. Mnesia has been a live saver in the development of
this application, but I can't find a decent solution to the mnesia
equivalent of COUNT(*) in SQL. I haven't been able to check the number
of records a certain query would return without reading the complete
set of results into a list and getting the length of the list.
I have been looking into the dirty_update_counter function, but this
doesn't guarantee anything when I have multiple mnesia nodes.
More information about the erlang-questions