title: Using Mysql to do multiple INSERT on linked tables
body: <p>I have two tables, one linked to the Primary Key of the other. At the moment I INSERT into table A, get the LAST_INSERT_ID, and then INSERT into table B. </p>
  
  <p>But I have hundreds of records to insert and I want to speed things up. </p>
  
  <p>In Mysql you can either:</p>
  
  <pre><code>INSERT INTO table_a (v1, v2, c3) VALUE (0, 1, 2);
  
  INSERT INTO table_a (v1, v2, v3) VALUE (4, 5, 6); 
  </code></pre>
  
  <p>etc, or</p>
  
  <p><code>INSERT INTO table_a (v1, v2, v3) VALUE (0, 1, 2), (4, 5, 6), etc</code> to add multiple entries faster - but only for one table.</p>
  
  <p>Of course the latter is much faster. I was wondering whether it was possible to replicate this behaviour for my example with two linked tables using a Stored Procedure, and whether it would have a similarly dramatic improvement in performance:</p>
  
  <p>something like: call special_insert((0, 1, 2), (4, 5, 6), etc); or similar.</p>
  
  <p>I have no Stored Procedure experience, so I'm fishing for ideas on which direction to proceed in.</p>