title: Should Parallel.ForEach be used in DB calls?
body: <p>I've got a list of Foo IDs. I need to call a stored procedure for each ID.</p>
  
  <p>e.g. </p>
  
  <pre><code>Guid[] siteIds = ...; // typically contains 100 to 300 elements
  foreach (var id in siteIds)
  {
     db.MySproc(id); // Executes some stored procedure.
  }
  </code></pre>
  
  <p>Each call is pretty independent of the other rows, this shouldn't be contentious in the database.</p>
  
  <p>My question: <strong>would it be beneficial to parallelize this using Parallel.ForEach</strong>? Or is database IO going to be a bottleneck, and more threads would just result in more contention?</p>
  
  <p>I would measure it myself, however, it's difficult to measure this on my test environment where the data and load is much smaller than our real web server.</p>