Share via


Batching Stored Procedure Calls

The SQL Server Native Client ODBC driver automatically batches stored procedure calls to the server when appropriate. The driver only does this when the ODBC CALL escape sequence is used; it does not do this for the Transact-SQL EXECUTE statement. Batching stored procedure calls can reduce the number of round trips to the server and significantly increase performance.

The driver batches procedure calls to the server when you execute a batch that contains multiple ODBC CALL escape sequences. It also batches procedure calls when bound parameter arrays are used with an ODBC CALL escape sequence. For example, if you use either row-wise or column-wise parameter binding to bind an array with five elements to the parameters of an ODBC CALL SQL statement, when SQLExecute or SQLExecDirect is called, the driver sends a single batch with five procedure calls to the server.

See Also

Running Stored Procedures