• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance problem - using Ref Cursor in stored procedure call from Hibernate

 
hildich kilal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using many stored procedures in my application. And We are calling them using normal callable statements.
Issue is the stored procedure takes very little time to execute.. hardly couple of seconds.
But it just hangs as soon as we do
"while(rs.next)".

I got to know ref cursor only start executing when first time "rs.next " is called. But the select query in stored procedure it self is not very heavy and returns from 10 to 1000 rows only.

My ref cursor definition is
Stored procedure is simple


The select is simple.
Is there any trick or issue with using ref cursor to return data in JDBC? Or is it possible that some DB settings is problematic
Any pointers in this regard will be highly appreciated / helpful.

Thanks

 
Jan Cumps
Bartender
Posts: 2608
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'Hanging' is most of the times not a performance issue. And from what I read from the post, the queries are small, and the return set of records is also normal.

Have you checked for locks? How does the stored procedure behave when you test it without JDBC?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic