NOTE: I am not looking for an answer from MSDN .
How did you determine the correct ADO.NET batch size for this database / application? What factors led to your decision and what experience can you share?
Using Fluent NHibernate, I am now using something like:
var sessionFactory = Fluently.Configure().Database( MsSqlConfiguration.MsSql2005.ConnectionString(c => c.FromConnectionStringWithKey("connString")) .AdoNetBatchSize(50) ) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<Foo>()).BuildSessionFactory();
In my opinion, this will collect up to 50 statements at a time before sending them through the Connection object to the server for processing.
Bret veenstra
source share