JDBC Type 4 Driver Performance Tuning Guide for Version 1.0
HP NonStop JDBC Type 4 Driver 
Performance Tuning Guide for Version 1.0 
Page 3  Hewlett-Packard Company — 529619-001  November 29, 2004 
run time. Set these values appropriately with your data source properties. 
Note: theses properties are not reset when a connection is pooled. 
•  Use prepared statements (PreparedStatement class), and parameterize its 
arguments. 
•  Avoid retrieving unnecessary columns: don't use "SELECT *". 
•  Turn off autocommit when possible (the default is on). All transaction levels 
might operate faster with autocommit turned off, although using this setting 
requires you to code commits. Leave autocommit on for single statements. 
•  Avoid repeatedly calling expensive database query functions such as: 
getBestRowIdentifier; getColumns, getCrossReference, get ExportedKeys, 
getImportedKeys, getPrimaryKeys, getTables, and getVersionColumns. If 
possible, call these functions once, and cache the returned data. 
•  Use the type-correct get() method, rather than getObject(). 
•  Always close Statement and ResultSet objects as soon as possible. 
•  Use “BROWSE” (READ UNCOMMITTED) access on SQL statements when 
possible. 
4  MXCS Tuning Tips 
•  Use a non-default server data source when making a connection, and 
configure the data source to optimize performance for your environment. See 
the “serverDataSource” property in the NonStop JDBC Type 4 Driver 
Programmer’s Reference manual, and “server data source” in the SQL/MX 
Connectivity Service Manual. 
5  Database Tuning Tip 
•  See the SQL/MX Query Guide. 
•  Safeguard supports multiple alias and password pairs for a single Guardian 
user name. Using these aliases or password pairs can improve performance 
because object caching reuses the underlying user name. You can set up an 
anonymous log-in capability by adding a user name such as guest with no 
password; then map this user name to a user group that has limited access to 
the SQL objects. 






