Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC: rowPrefetch ignored in ojdbc11 23.7 when calling DatabaseMetaData.getColumns()

P PDec 3 2025

Hello,

After upgrading the Oracle JDBC driver from
com.oracle.database.jdbc:ojdbc11:21.9.0.0
to
com.oracle.database.jdbc:ojdbc11:23.7.0.25.01,
the execution time of the following method (on a slow network connection) increased significantly — from about 5 seconds to 50 seconds:

public ResultSet oracle.jdbc.driver.OracleDatabaseMetaData.getColumns( String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern ) throws SQLException

When debugging, I found that although this method internally calls:

rs.setFetchSize(4284);

the corresponding Statement still has:

rowPrefetch = 1

In the older driver version, this value was correctly set to 4284.

From the debugging process it appears that the issue may be related to the isFetchStreams flag.
In stmt.outBindAccessors[4].newstmt this flag is set to true, which results in rowPrefetch being forced to 1.

Thank you in advance for your help.

Peter

Comments
Post Details
Added on Dec 3 2025
0 comments
41 views