Question

The table has only two column. One is key, the other is value. The key is like sequencial number from 1,2,3,...N. I want to search many values at the same time by providing the list of keys for saving time rather than one by one by calling mnesia:read/N. Is it possible? The key lists may be like '1, 21, 55' not have some rule.

Was it helpful?

Solution

The table is really small, so non of ets:match nor select will make a difference. The only optimization I see is to use dirty_read and do not wrap in transaction each read.

I am not sure here, but due to the nature of mnesia linear hashing, there is no bulk read hidden API. If your keys can be totally random, it would not help anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top