long startTime;
long stopTime;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection("jdbc:oracle:oci8:@dssnt01","scott","tiger");
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
startTime = System.currentTimeMillis();
ResultSet rset = stmt.executeQuery(
"select id, code, descr, insert_user, insert_date " +
"from testxxxperf where id = 1");
rset.next();
stopTime = System.currentTimeMillis();
rset.close();
stmt.close();
conn.close();
System.out.println( "Elapsed time in milliseconds: " + Long.toString( stopTime - startTime ) );