title: T-SQL Fastforward Cursor vs. foreach
body: <p>i want to caluclate the distance between gps-point to get the complete distance between the first an last point.</p>
  
  <p>My question is: What is faster?</p>
  
  <ul>
  <li>To load all rows into a DataTable and
  calculate it in c#.net via foreach
  or</li>
  <li>Caluclate it on Sql-Server using a
  StoredProcedure with a FastForward
  Cursor.</li>
  </ul>
  
  <p>I talk of a amout of about 400,000 rows.</p>