aspose file tools
The moose likes JDBC and the fly likes Cursors and PreparedStatements Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Cursors and PreparedStatements" Watch "Cursors and PreparedStatements" New topic
Author

Cursors and PreparedStatements

kg manuel
Greenhorn

Joined: Mar 01, 2005
Posts: 5
Hi guys, i used the built-in google search to check if any previous posts might be relevant and found none so i am posting this question.

Our DBA is having troubles with having too many cursors with a specific sql. i am not authorized to post the exact sql. but here is a general idea.

initially, the table has 25+ fields all inserted using a PreparedStatement. statistically, this sql runs atleast 50-100 times a day.

within the database system, Oracle 10g to be specific, a trigger is created to fill the primary key field. this trigger is runned before the actual insert is runned.

now, i am already expecting the trigger as a source of the cursor population. i would like to ask if the PreparedStatement adds up that much as well.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3673
    
    2

Good Oracle DBAs are hard to find...

Also, are you sure all connections/statements are being regularly closed or is it one particular transaction that is hurting performance?


My Blog: Down Home Country Coding with Scott Selikoff
kg manuel
Greenhorn

Joined: Mar 01, 2005
Posts: 5
thanks scott for your time.

yes there is one statement not being closed properly. that one is already fixed. i would like to confirm however if the number of '?' in the PreparedStatement has something to do with it.

thanks again in advance.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Cursors and PreparedStatements
 
Similar Threads
Prepared Stmt or Stored Procedure ?
jdbc
benefit of PreparedStatement if closed due to error: maximum open cursors exceeded
How to start a Trigger from a java Application
getting error while droping the user in oracle.