• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
reply
    Bookmark Topic Watch Topic
  • New Topic