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 questions about statement types and performace . 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 "questions about statement types and performace ." Watch "questions about statement types and performace ." New topic

questions about statement types and performace .

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Which type of result set has best performace for a read only purpose ?
is it wise to use

i just want to retrive one column of one record (my query will return just one record)

thank you
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32481

ResultSet.TYPE_FORWARD_ONLY , ResultSet.CONCUR_READ_ONLY is best here. You don't need any scrolling capability or to update the data.

[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
Paul Clapham

Joined: Oct 14, 2005
Posts: 19723

That's true. Personally I only ever use forward-only, read-only result sets. However if your query is only returning one record, the choice is going to make almost no difference in practice.
Have you checked out Aspose?
subject: questions about statement types and performace .
It's not a secret anymore!