title: Row locking in MySql InnoDb with foreign key constraints and indexes applied?
body: <p>Quick question.</p>
  
  <p>Talking to my friend with 25 years db experience he was telling me if you use foreign key constraints in a db; when a table is being written to for example, a table for messages, it will lock out the relative row on the parent table for say, users.</p>
  
  <p>Is this true?</p>
  
  <p>Also he said that applying indexes to the Foreign Key Columns should overcome this locking out, is this true?</p>
  
  <p>I am concerned as my website traffic is growing and I can imagine this being an issue!</p>
  
  <p>Thanks!</p>