How to do a loop over a datatable faster in c#

  • Thread starter Thread starter azolfaghari
  • Start date Start date
A

azolfaghari

Guest
Hi List,

I have a datatable, dt which has 100,000 rows. I need to do some calculations over each row in dt. The calculation is very complicated and therefore I can't do it over SQL server. Now the problem is no matter if I use FOR, or FOReach(DataRow r in dt.Rows), the process is very slow. I am just wondering if there is a way to do this faster in c#. I am not sure if any one is familiar with SApply, LApply in R. They are super fast comparing to FOR loop. I think that these functions have been written in c as well. I appreciate any idea.

thanks

Arvin

Continue reading...
 
Back
Top