This is a typical mail server feature. So..
a. Another solution is to just use a real mail system / server in the background.
This is a bit more complicated to set up (for each user and each group on your site there must be a real email address on the local server, which is used only within the user), and let the mail server process several messages sent to groups, etc. etc.
In any case, think about the fact that you should probably provide functions such as reading a message, an unread message, marking a message (as important, etc.), deleting a message. Therefore, I believe that you cannot avoid recording one message per user. Now think how many messages can really be in this table in the database. If one user has an average of 100 messages in his inbox (which is very important, we are talking about average), this will mean (see APC answer ) a table with 2 columns (integers) having 5 million rows indexed by user_id . This is not a problem for any serious database.
B. Now, if you are really interested in performance, you can use the hash storage / DB (for messages only), for example Memcached, Tokio Cabinet, CouchDB, MongoDB, etc.
source share