When using Oracle JDBC driver version 184.108.40.206.0 (ojdbc6.jar), a User Defined Function (UDF) is taking over 5 seconds to run. When using the 220.127.116.11.0 driver the same UDF takes less than 50ms. The Oracle database server is running 18.104.22.168.0.
My application calls several different Oracle databases, which are running different versions of Oracle...hence the reason for the mismatch on my driver and server versions.
Is it OK to use the 22.214.171.124.0 driver, when calling a server running 126.96.36.199.0? Has anyone else seen a similar issue? Any ideas on what may be causing this? Or any ideas on what to check?
Here is some additional information. We are using java.sql.Struct, oracle.sql.ARRAY, and oracle.sql.Datum. The structured type that we are getting back from the database has several levels that our code traverses, similar to below:
Struct struct = (Struct)resultSet.getObject(0);
Object attributes = struct.getAttributes();
oracle.sql.ARRAY array = (oracle.sql.ARRAY)attributes;
Datum datums = array.getOracleArray();
Struct struct2 = (Struct)datums;
Object attributes2 = struct2.getAttributes();
oracle.sql.ARRAY array2 = (oracle.sql.ARRAY)attributes2;
Datum datums2 = array2.getOracleArray();
Struct struct3 = (Struct)datums2;
Object attributes3 = struct3.getAttributes();
String abc = (String)attributes;