Repeated Calls of a PL/SQL Procedure That Takes an ARRAY Argument Are Slow in JDBC 10.2. (Doc ID 1097053.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version 10.2.0.1 to 10.2.0.4 [Release 10.2]
Information in this document applies to any platform.
***Checked for relevance on 21-Oct-2011***

Symptoms

A java application that connects to a database via JDBC/Thin 10.2.0.4 repeatedly calls a PL/SQL stored procedure that takes an ARRAY argument. The relevant Java code is:
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("ESDBO.ARRTEST_TBL", conn);
ARRAY newarray = new ARRAY(desc,conn,usrprofiles.toArray());
OracleCallableStatement cstmt = (OracleCallableStatement)conn.prepareCall ("{ call arrtest_proc( ? ) }");
cstmt.setARRAY (1, newarray);

This is slow, taking 10 secs for 40k of data.

SQL trace shows the following sql statement as many times as the array size.
SELECT INSTANTIABLE, supertype_owner, supertype_name, LOCAL_ATTRIBUTES
FROM
all_types WHERE type_name = :1 AND owner = :2

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