title: Updating multiple rows in one query very slow performance
body: <p>I am looking at the best way to update multiple rows at once with a single query.
  Currently I have:</p>
  
  <pre><code>UPDATE `profiles` SET `name` = CASE `id` WHEN 1 THEN 'John' WHEN 2 THEN 'Jane' END, `gender` = CASE `id` WHEN 1 THEN 'Male' WHEN 2 THEN 'Female' END WHERE `id`=1 OR `id`=2
  </code></pre>
  
  <p>but this takes about 4 minutes to complete (my real query is on 10 fields in a database of 20 million rows) as opposed to individual update queries that take about 1 second.</p>
  
  <p>I am trying to work out why, what is actually happening? I thought that by specifying the id in the WHERE clause that this would speed it up.</p>