dataset processing method

chrisb

Member
Joined
Oct 12, 2012
Messages
10
Programming Experience
Beginner
HI i was working on my hobby project ( point of sale system ) . i was working on large data (15k records) in which few functions needs complete dataset to be processed(ex: price for similar products has to be update. so i have to search for replicate code in the entire datatable and update sell price). now i was using data fill command to load dataset and update command to save change in dataset. i was using local server so the load time in low but if i use remote database its taking lot of time(2min).is this a right way? or any other procedure which can reduce loading time?
 
Do you really need to retrieve the data in the first place? Can you not just execute an appropriate UPDATE statement directly against the database? You would then call ExecuteNonQuery on a command and then it's just the processing time on the database and no time to transfer data in either direction.

If you can't do that because each record gets updated differently then you may still be able to do the filtering part using SQL code and then only retrieve a small number of records rather than the whole lot. As an application developer you want to keep as much logic as possible in your application code but sometimes you need to trade-off against performance and push some of the logic to the database.
 
Back
Top