Reputation: 53
I am querying data from Database table say(ABCD) and want to store it in some DataStructure, then read it row by row and perform calculations on the values and update the datastructure with the modified values.
Finally once calculation on all the rows is finished, i would update ABCD table with updated values for each row.
Please suggest the data structure to be used which would give best performance. I am considering the use of 2D array or DataTable.
Upvotes: 2
Views: 4685
Reputation: 752
Array
DataTables
Faster searches (DataTable to LINQ is the fastest than DataTable.Select) LINQ was still a lot faster than using normal DataSet methods (40-50 times faster!)
Fast insertions, removal, and sorting
Upvotes: 1
Reputation: 7484
An array is much lighter than a datatable but has no data structure operations. However while the data table is a heavy object it is much easier to work with
Upvotes: 5