We have been investigating how to improve the performance of using Java with Oracle. Given our experience in Pro*C we used array inserts to give a significant speed improvement and would like to do the same in Java.
We have been looking into this and have come to a point where it is nearly possible. The only issue we have is with the error handling. When an error occurs in a batch of say 1000 then it is not possible to determine which in the 1000 failed.
This is part of the 2.0 specification and it would be good to know if and when this would be available.
here is the response i have posted in another forum
according to the JDBC spec, an entry in the array may have the following values:
1. If the value of an array entry is greater than or equal to zero, then the batch element was processed successfully and the value is an update count indicating the number of rows in the database that were effected by the elementÃ¢Â€Â™s execution.
2. A value of -2 indicates that a element was processed successfully, but that the number of effected rows is unknown.
because we can't natively get back, from the database, the number of rows updated per each array element, our implementation is compliant with #2.
We could have simulated this under the cover but at the cost of additional roundtrips.