title: Storing a mailing list in Database / MySQL
body: <p>I have table with millions of records (rows).
  And in this table there is a column in the table called mail_to.
  Corresponding to each record there is a mailing list and then information of mailing list is stored in this column mail_to.
  In the current implementation of my system, I have stored the mailing list as a list of comma separated mail ids. </p>
  
  <p>For example 
  Consider a table, <strong>Subscription Data</strong> </p>
  
  <pre><code>     | Column A | Column B |........ | mail_to                     |
       | Record 1 | abc      |         | xyz@gmail.com,abc@gmail.com |
  </code></pre>
  
  <p>The current implementation  works fine if I want to retrieve mailing list corresponding to a record. But if I want to search the records corresponding to abc@gmail.com,  querying  is too slow.</p>
  
  <p>One way I could think was </p>
  
  <p>Storing Column A to Column N in <strong>Subscription Data</strong> 
  and then mail ids in a separate table say <strong>User Email Data</strong> 
  and a third table that stores the information of join.</p>
  
  <p>But, I am not sure if it will give me any improvement since there will be 2 joins every time I will query.</p>
  
  <p>Can any one suggest a better way to store this mailing list/ help me evaluate which is better of the two. Any help would be appreciated .</p>
  
  <p>Thanks</p>