• Post Reply Bookmark Topic Watch Topic
  • New Topic

Updating only modified fields

Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Consider a scenario in which a form with several editable elements are shown to the User. This form has a save button. Now the User makes some changes and clicks on the save button. The usual practise is to save all the elements (rather than the changed ones). I have heard that its a better practice to save only the modified changes. But this approach has several difficulties :
1. Need to detect a change and which element has changed.
2. We will have to use dynamic Queries.
3. Since the Queries are dynamic i will have to use Java Statement objects rather than Prepared Statements.
Please give your thoughts on this. Is is always advisable to update only the modified field? Now that my Update Query keeps changing, will that not have a negative impact that i cannot have the Query parsed and the Query plan ready, since each query will be a new one (in most cases).
Please give your thoughts on this. Is it actually worth Updating only modified fields??
Sajee Joseph
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!