Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

limit result through JDBC

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I need to go other around 100,000 rows (row has 7 columns from join between tables) in bulk of 500-1000, do my process (around 20 sec for bulk) and take additional bulk ....

My question:

from performance perspective should i leave the result set open or for each bulk create result set and set beginning (by absolute ) at the end of the last bulk row?

I understand that when you use "absolute" the database iterate over all rows until this point , dosnt the database has any algorithm to do this without iterate over all rows?

Thank you
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

you can use SQL cached row result set for achive your goal

like :


Arunkumar S
 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have 1000 rows in the resultset, so it will copy all rows?
 
author & internet detective
Posts: 39997
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you could use the SQL query itself to only return the rows you want to each connection is independent. Then you don't have to worry about using resources between requests. You could use rownum or the primary key of your table in the query.
 
Screaming fools! It's nothing more than a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic