Performance issue using TIMESTAMPTZ with JDBC 11g drivers (Doc ID 783882.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version 11.1.0.7 and later
Information in this document applies to any platform.

Symptoms

JDBC application accessing a TIMESTAMP WITH TIME ZONE column using the oracle.sql.TIMESTAMPTZ class runs many times times slower
using a JDBC/thin 11g driver than a JDBC 10g driver

Example:

create table test ( id number(10), tstz_col TIMESTAMP WITH TIME ZONE);


JDBC testcase using the query: select * from test;








 

for ( int j=1; rs.next(); j++ )
{
for ( int i=1; i<=rsmd.getColumnCount(); i++ )
{
Object obj = rs.getObject(i);
if ( obj instanceof TIMESTAMPTZ ) {
TIMESTAMPTZ tsTZ = (TIMESTAMPTZ) obj;
if ( j == 1 ) {
if ( i > 1 )
System.out.print( ',' );
System.out.print( tsTZ.getClass().getName() );
}
tsTZ.timestampValue( conn );
}
}
if ( j == 1 )
System.out.println();
}

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms