Send feedback on this topic.
Teradata.Client.Provider
How Statement Independence Affects Batch Update
.NET Data Provider for Teradata > Developer's Guide > Working with the Data Provider Features > TdCommandBuilder and TdDataAdapter Overview > Batch Update > How Statement Independence Affects Batch Update

When a Multi-Statement Request or Iterated Request is processed by the Teradata Database version 13.0 or earlier, all the Statements contained in the Request must succeed in order for the Teradata Database to get updated. If one statement fails the entire request fails. There is a significant degradation of performance when errors occur during a batch update and processing is to continue on errors.

Note

The Teradata Database only supports Statement Independence with INSERT statements. The Statement Independence feature will be extended to UPDATE and DELETE statements in a future release of the Teradata Database.

When TdDataAdapter.ContinueUpdateOnError is set to true and the Data Provider cannot take advantage of the Statement Indepdendence features the following tasks are performed:

  1. The row that caused the error is removed from the batch.
  2. The Data Provider processes the modified batch.
  3. If another row causes an error, the above tasks are performed again until no erors are generated.

The Statement Independence feature contained in the Teradata Database beginning with the 13.10 release and the Data Provider 13.11 will significantly improve batch update performance in scenarios where statements in the batch causes errors. The batch will only be processed once. The Teradata Database will return status information for each of the rows that were sent and the Data Provider will use this information to set the fields of DataRow. It is the responsibility of the application to scan the DataTable.Rows for errors.

The Data Provider will submit a batch update to the Teradata Database using Statement Independence under the following conditions: