Sudheer Kumar

ASP.Net, C#, BizTalk, MSBuild, WPF, WCF, WF....
posts - 28, comments - 111, trackbacks - 16

My Links

News



Archives

Post Categories

Update Grams - The magic tags

I have read about the Update Grams and DiffGrams and know that the ADO.NET datasets work based on these technologies. Recently I got another requirement to update database in bulk with out using stored procedure. I was under the impression that SPs are compiled and with Application Blocks used for Caching the Stored Procedure parameters, that is the fastest way to update. I decided to compare the DB updation using Application Blocks+SP Vs UpdateGrams.

The statistics goes like this. I updated all the fields of the Customer table in the North wind DB and updated the same using both the ways. The Appl Blocks took on an average 60ms to update 90 records, where are the Update Grams took only 30 ms..!!! Another thing is that out of the 30 ms I took for updating using UpdateGrams, 15 ms was taken for constrcuting the UpdateGram XML using my custom class...!!! That was really stunning.

I was under the impression that eventhough the entire data is being pushed in one stretch, it will not be better than SP which is compiled. Also I was using the same command object for updating each rows in the table.

I am in the process of fine tuning my Custom UpdateGram class and will post it once I am done. So stay tuned..!!

BTW has any body seen any library for creating the Updategram XML. There are a lot of things to take care like NULL value handling, character encoding, return values while creating the custom class for generating updategram XML.

 

Print | posted on Saturday, August 12, 2006 2:48 PM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: