[erlang-questions] Mnesia record count

Maarten Engelen maarten@REDACTED
Tue Nov 27 11:20:42 CET 2007

2007/11/27, Paul Mineiro <paul-trapexit@REDACTED>:
> If the issue is memory consumption, you can use mnesia:select/4 to get the
> results in (small) chunks.
> -- p

It is not so much memory consumption as a speed consideration. The
scale of the application is that it needs to handle about 5000
concurrent connections that do around 1000 requests per second on the
system. Each of these requests needs to check the size of a subset of
a table with about 50000 rows. If mnesia is fast enough to handle it
by reading in the complete subset of a few thousand rows and checking
it's length every time, I'm fine with that.

Nevertheless, counting the amount of rows in a defined subset of a
table looks like a basic operation to me. In essence it's a query
without returning results. That made me wonder if I missed anything in
the documentation.


More information about the erlang-questions mailing list