Turn off statement scanning
To increase performance, you can configure Db2 ODBC to scan for vendor escape clauses only on handles that have escape clauses.
About this task
By default, Db2 ODBC scans each SQL statement for vendor escape clauses. If your application does not generate SQL statements that contain vendor escape clauses, turn off statement scanning.
Procedure
To turn off statement scanning
Set the SQL_ATTR_NOSCAN statement attribute to SQL_NOSCAN_ON.
You can set this attribute with either of the following functions:
Option | Description |
---|---|
SQLSetStmtAttr() | When you set the SQL_ATTR_NOSCAN statement attribute to SQL_NOSCAN_ON
with SQLSetStmtAttr() , you turn off statement scanning
for all SQL statements that are issued on a statement handle. |
SQLSetConnectAttr() | When you set the SQL_ATTR_NOSCAN statement attribute to SQL_NOSCAN_ON
with SQLSetConnectAttr() , you turn off statement
scanning for all SQL statements that are issued on a connection handle. |