Enable Prefetch Close for Read-Only Transactions

Performance impact: Variable

A TimesTen extension enables applications to optimize read-only query performance in client/server applications. When you enable prefetch close, the server closes the cursor and commits the transaction after the server has fetched the entire result set for a read-only query. This enhances performance by decreasing the network round-trips between client and server.
  • ODBC: Use the SQLSetConnectOption to set the TT_PREFETCH_CLOSE ODBC connection option. See Optimizing Query Performance in the Oracle TimesTen In-Memory Database C Developer's Guide.

  • JDBC: Call the TimesTenConnection method setTtPrefetchClose() with a setting of true. See Optimizing Query Performance in the Oracle TimesTen In-Memory Database Java Developer's Guide.