Which is worth more: DataSets or multiple upgrades?

If my program ended up in a database with multiple updates, it would be better to dump the tables into the dataset, change the values, and then send them back to the database. Does anyone know which is more expensive?

0


source to share


3 answers


Regardless, the database should perform all of these updates based on the changes you made to the local DataSet. From what I understand, this will be as expensive as a rolling upgrade. The only advantage is that it is easier to iterate over the dataset rather than pulling one result after another.



+1


source


What's going to be expensive is all of the workaround code to eliminate possible exceptions that might arise because you choose "which costs less" over "the simplest". Premature optimization.



+1


source


Depends on the size DataSet

. If your dataset is too big, it's not worth it. Otherwise, it might be a good approach. However, nothing prevents you from performing multiple updates in a package without even using DataSet

. You can write a parameterized stored procedure XML

that will perform batch updates for you.

0


source







All Articles