-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Doc: ParameterMetaData.getParameterType performance on Oracle 12c [SPR-16139] #20687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Juergen Hoeller commented There has been quite a bit of JDBC baseline upgrading in Spring Framework 5.0, so maybe this is a side effect... Any insight (or even guess) into where the different behavior might be caused? |
Adam Sojka commented I have just verified that rolling back spring-jdbc to 4.3.10 resolved the issue. |
Adam Sojka commented I couldn't find anything else causing the issue, rollback did the job. I rolled back spring-jdbc alone leaving other spring libraries at version 5.0.1. |
Juergen Hoeller commented I have a suspicion that this is the same effect as with #19196... a workaround which we removed in 5.0 as part of our JDBC baseline upgrade. You could try setting That said, see my comment in #19196: Recent Oracle 12c drivers should not expose that cursor leak anymore. If an Oracle driver upgrade helps, that would also be great to know! |
Adam Sojka commented I have replaced the existing driver with ojdbc8.jar version 12.2.0.1 which fixed the problem. I was no longer getting maximum open cursors exception and the process completed successfully. The only problem is the performance. The batch update operation used to take 0.5 seconds for 250 records but now it takes 6 seconds instead. After rolling back to spring-jdbc 4.3.10.RELEASE the timings where back to normal - 0.5 second (using the new Oracle driver). Overall the new JDBC driver does address the issue of the exception but there is a performance problem now. |
Juergen Hoeller commented Thanks for the feedback, that's good to know! For the performance part of the problem, does it help to set |
Adam Sojka commented Yes, after adding spring.properties with spring.jdbc.getParameterType.ignore=true the performance issue was resolved. In Summary to resolve the issue one need to:
|
Juergen Hoeller commented Alright, let's turn this into a documentation task then, putting specific notes for Oracle 12c into our reference documentation. |
Juergen Hoeller commented BTW, I've created #20763 inspired by your source code example (and a similar case in our reference documentation). Such manual collection adaptation shouldn't be necessary. I've added overloaded methods to
|
Adam Sojka commented Juergen, Thank you very much for resolving the issue. |
Adam Sojka opened SPR-16139 and commented
After upgrading from Spring 4.3 to 5.0.1 the NamedParameterJdbcTemplate.batchUpdate call results in an exception ORA-01000: maximum open cursors exceeded when using with Oracle 12c.
The batchUpdate is updating batches of 250 records.
The applications code hasn't changed in method where exception is being thrown.
In the method the updateSql is predefined and the batchValuesList is up to 250 elements in size.
Affects: 5.0.1
Issue Links:
Referenced from: commits daee6ee
The text was updated successfully, but these errors were encountered: