title: mysql repeated data in rows vs join performance
body: <p>I have a table with information that is imported from different files. Some columns of this information are the same for all files. (e.g. the unique person by id peter@example.com, will have the same name and city in all files.)
  However some other information is not always the same (e.g. amount)</p>
  
  <pre><code>id, file_id, amount, email, name, city, ...
  1, 1, 30, peter@example.com, peter, paris
  2, 1, 50, mary@example.com, mary, berlin
  3, 2, 12, peter@example.com, peter, paris
  ...
  </code></pre>
  
  <p>I currently consider to put the duplicate information in a separate table:</p>
  
  <pre><code>data
  id, file_id, amount, email_data_id
  1, 1, 30, 1
  2, 1, 50, 2
  3, 2, 12, 1
  
  
  email_data
  id, email, name, city
  1, peter@example.com, peter, paris
  2, mary@example.com, mary, berlin
  </code></pre>
  
  <p>I am concerned that this may impact query performance since it will need to use a join. Does the database handle this well or is it better to stick with the duplicates in order to improve query times?</p>