This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "callablestatement.getobject takes long time" Watch "callablestatement.getobject takes long time" New topic
Author

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
Sheriff

Joined: Oct 27, 2005
Posts: 20078
    
  30

Moving to JDBC


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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?


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
Have you checked out Aspose?
 
subject: callablestatement.getobject takes long time
 
It's not a secret anymore!