I am receiving a multidimensional array from outside my application (via web service). I need to persist this to a table in a database. Is there is a simple/efficient way to process this array? The code below is too slow Example1 as it is linear function O(m*n) see Google result: http://pages.cs.wisc.edu/~vernon/cs367/notes/3.COMPLEXITY.html
. Example2 is slightly faster (not as flexible) but it still needs to iterate the maxRow times say 5000. I am just looking to see if there is a better way to store an array to a table.
For i = 0 To maxRow
For j= 0 To maxColumn
'save to db
For i = 0 to maxRow