Tuesday, May 31, 2005

I am not a regular reader of Jackie Goldstein's blog, but I make sure to catch up every now and then; today I encountered an interesting post in which he discusses a long-overdue improvement to ADO.NET: the ability to specify a batch size for a DataAdapter.Update statement. One of the stupidest shortcomings of ADO.NET 1.0 and 1.1 was that it would make a round-trip for each changed row, which in the case of large updates or over high-latency networks results in horrible performance.

Apparently ADO.NET 2.0 includes the ability to specifiy the batch size, however there are some things worth knowing about this behaviour (specifically, less commands issued to the database do not necessarily equate less round-trips on the network; also, as Jackey puts it, "creating batches of different commands every time would wreak havoc on the query plan cache." Jackie goes on to link to a post in Pablo Castro's (the ADO.NET Program Manager) blog, which explains these issues in a little more detail.

An interesting read, certainly.

Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview