wood burning stoves*
The moose likes JDBC and the fly likes callablestatement.getobject takes long time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "callablestatement.getobject takes long time" Watch "callablestatement.getobject takes long time" New topic

callablestatement.getobject takes long time

Chinni Bujji
Ranch Hand

Joined: Jan 31, 2007
Posts: 60
Hi All,

I have stored procedure and I am trying to call it using a callable statement
but the number of rows in the table are huge and it will constantly increase
right now the number of rows are 22894772

and my stored procedure at a time should get me 25 records
my question is when we callablestatement.getobject() will it get total records in the table thats why it is taking too long approximately 2 minutes
or will it get 25 records into the resultset

thanks in advance
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

Moving to JDBC

How To Ask Questions How To Answer Questions
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30068

It depends on your database driver so you'll have to try it. Why not pass the start/end index to your stored procedure and let it only return the 25 rows you need?

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
It is sorta covered in the JavaRanch Style Guide.
subject: callablestatement.getobject takes long time
Similar Threads
xls or csv file as in parameter in stored procedure
Using JDBC versus Stored Procedures
How to scroll between resultsets...
how to inform the total rows to trinidad table