I’m building an application in which at some point in the near future we’d like to use the distributed features of Mnesia. However, since this is a chat application and there is little use for e.g. cross-channel searching capabilities, I’ve been thinking about the best structure for the tables.
It might make sense to create a table per channel, since common search-operations only happen in one channel, (so then we do not have to filter 99% of the messages because they are not of interest since they are from another channel right away).
In a more general sense: if you have structured data, fields that (together) uniquely identify groups of data that do not often need to be considered together, might be used as (part of the) table name instead, right?
However: Creating a new Mnesia table might itself have some overhead. How large is this? When does it make sense to split tables into more, smaller ones?