My Oracle Support Banner

JDBC 12.1.0.2 Is Slower Than JDBC 11.2 or 11.1 for ResultSet.next(), Even With Patch 20884977 (Doc ID 2188860.1)

Last updated on FEBRUARY 10, 2022

Applies to:

JDBC - Version 12.1.0.2.0 to 11.2.0.2.0 [Release 12.1 to 11.2]
Information in this document applies to any platform.

Symptoms

On : 12.1.0.2.0 version, Thin JDBC driver

The JDBC jar file ojdbc7.jar released with JDBC 12.1.0.2 on JDK 1.8 takes more time to return results from a call to an Oracle 12.1.0.2 database, when compared to the same code, same database but reference to JDBC 11g ojdbc6.jar.
That is, JDBC 12.1.0.2 is slower than 11.2 for ResultSet.next(), even with <patch 20884977>.

- With JDBC 11.1.0.7:

Running query...
It took 32 ms to execute query.
It took 5774 ms to do NEXT and 63 ms to do READ. Total records: 130000.

Running query...
It took 8 ms to execute query.
It took 5743 ms to do NEXT and 32 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 5780 ms to do NEXT and 41 ms to do READ. Total records: 130000.

Running query...
It took 2 ms to execute query.
It took 5736 ms to do NEXT and 43 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 5742 ms to do NEXT and 32 ms to do READ. Total records: 130000.


- With JDBC 11.2.0.4 :

Running query...
It took 37 ms to execute query.
It took 6247 ms to do NEXT and 46 ms to do READ. Total records: 130000.

Running query...
It took 6 ms to execute query.
It took 6239 ms to do NEXT and 35 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 6243 ms to do NEXT and 43 ms to do READ. Total records: 130000.

Running query...
It took 3 ms to execute query.
It took 6257 ms to do NEXT and 37 ms to do READ. Total records: 130000.

Running query...
It took 3 ms to execute query.
It took 6298 ms to do NEXT and 39 ms to do READ. Total records: 130000.


- With JDBC 12.1.0.2 with <patch:20884977> :

Running query...
It took 78 ms to execute query.
It took 7233 ms to do NEXT and 95 ms to do READ. Total records: 130000.

Running query...
It took 8 ms to execute query.
It took 7157 ms to do NEXT and 37 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 7096 ms to do NEXT and 51 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 7153 ms to do NEXT and 64 ms to do READ. Total records: 130000.

Running query...
It took 4 ms to execute query.
It took 7136 ms to do NEXT and 34 ms to do READ. Total records: 130000.

 



--EXPECTATION

Both 11g ojdbc6.jar and  12c ojdbc7.jar should have the same performance if not better in ojdbc7.jar compared to ojdbc6.jar.


Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.