Cached Statements
\The Sandbox \PB History & Future \New in PB 4 \DB Enhancements \Cached Statements
Array Fetches
in Oracle 7
Bind Variables
Select & DB
Remote Procedure
Oracle 7
Cache in
SQL Server
System 10
Watcom 4.0

Cached statements are supported in DataWindow-generated SQL statements and SQL painter-generated embedded SQL statements (SELECT, INSERT, and UPDATE) for Watcom, ORACLE, and for ODBC if the back-end database supports it. When a statement is cached, it is parsed, optimized, and described once and cached (retained) so it can be used again (the cursor and the result set description are retained). This improves the performance of frequently executed statement (such as INSERTs).

If your database does not support bind variables, caching will be of minimum value. The number of hits will be small; you will have a hit only when there is an exact match. To check the number of hits, look at the SQLReturnData attribute of the Transaction Object after you disconnect from the database. The number of cached hits is stored in SQLReturnData when you disconnect from the database.

To implement cached statements, set the new DBParm variable SQLCache to a value. For ODBC databases, set this variable to the number of cursors you want to open in a script. For information about setting this variable for Oracle, click here. 

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map