Click or drag to resize

IDataAccessAdapterBatchSize Property

Gets / sets the size of the batch command when performing multiple entity insert / update / delete statements. If set to a value of 0, every entity insert / update / delete statement will be executed using its own DbCommand. If set to a value of 2 or higher, insert / update / delete statements are packed together into a single DbCommand, the number of packed statements is equal or lower than the value of BatchSize. Packed statements are queries with multiple SQL statements packed together in a single DbCommand. It's not recommended to set this property to a very high value, as databases process packed SQL statements slower than single commands and as parameter names are unique across the complete SQL string, re-using execution plans is not always possible. Set BatchSize to a value of 30 or lower for most operations; it's primarily used to mitigate network latency: the higher the network latency the higher BatchSize can become, to the point where processing the packed SQL string by the database is slower than the combined network latency of all single SQL statements.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.6.0.0 (5.6.19.0117)
Syntax
int BatchSize { get; set; }

Property Value

Type: Int32
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionWhen set to a value of -1 or lower
Remarks
Not all databases support packing multiple SQL statements into a single DbCommand. Please consult the LLBLGen Pro Runtime Framework user manual for a list of databases which support this feature. If the database used with this DataAccessAdapter doesn't support batching, setting this property has no effect, it will always be reset to 0, and all SQL statements are executed in their own DbCommand
See Also