This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setFetchSize() ??

 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If I am using setMaxRows() or setFetchSize(), how will i know if there are more rows to be retrived.
I do not want to fire a query with count(*) and compare.

Thanks
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setFetchSize() has nothing to do with the number of rows you can retrieve in your select statement. setFetchSize() only suggests the number of rows fetch over from db server to app server in each round trip. setMaxRow() indicates your resultset can accomodate only this number of rows. If your query returns more rows than the value you set, the extra rows will be drop. If resultset.size() < the value you set, you know you get every record. If resultset.size() == the value you set, you may or may not get every record (more likely you may not)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic