title: MySQL - Store posts sent to large number of users
body: <p>I'm building a web app with a complementary mobile app. Let's say for the purposes of the question that the web app is used to create messages that are sent to all or a subset of the mobile app users. I'm trying to determine the best way to store these messages.</p>
  
  <p>Currently, I have it set up with one table <code>messages</code> that stores the messages and another table <code>recipients</code> that stores a record for each recipient per message.</p>
  
  <p>For example, if I have a message with an id of <code>1</code> which is sent to three users <code>alex, bill, chris</code>, then the <code>recipients</code> table will look like this:</p>
  
  <pre><code>recipients_id | message_id | username
  1             | 1          | alex
  2             | 1          | bill
  3             | 1          | chris
  </code></pre>
  
  <p><code>message_id</code> is the primary key of <code>messages</code> and <code>username</code> is a field in the <code>users</code> table (I'm actually using an INT PK, but just using a string for the question).</p>
  
  <p>Now just imagine that instead of three users, the message is sent to a few hundred or even a few thousand users. Is this still viable? I know MySQL tables can handle millions of records, but I'm just wondering if this is the most efficient method.</p>