Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.67 KB

File metadata and controls

27 lines (22 loc) · 1.67 KB
title Batching Stored Procedure Calls
description Batching Stored Procedure Calls
author markingmyname
ms.author maghan
ms.date 03/14/2017
ms.service sql
ms.subservice native-client
ms.topic reference
helpviewer_keywords
stored procedures [ODBC], batching
ODBC, stored procedures
SQL Server Native Client ODBC driver, stored procedures
batches [ODBC]
ODBC CALL escape sequence

Batching Stored Procedure Calls

[!INCLUDESQL Server Azure SQL Database Synapse Analytics PDW]

The [!INCLUDEssNoVersion] 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 [!INCLUDEtsql] 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