It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Resultset.getFetchSize() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Resultset.getFetchSize()" Watch "Resultset.getFetchSize()" New topic


trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
Hello all,

In the java API documentation the description for the above method is:

public int getFetchSize()
throws SQLException
Retrieves the fetch size for this ResultSet object.

What is a fetch size? is it the numbe rof return row counts?? or the numbe r of column row count from which the data is fetched?

I think the second ans is right. wanted to confirm.

Jim Cheng

Joined: Dec 08, 2004
Posts: 11
None of them

Fetch size is the number of rows that should be fetched from the database when more rows are needed.

If a fetch size has not been set by calling the method setFetchSize, the return value is implementation-specific.

It is sorta covered in the JavaRanch Style Guide.
subject: Resultset.getFetchSize()
It's not a secret anymore!