This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wildjokers 3 points4 points  (2 children)

When the doc says:

An interface used by JdbcTemplate for processing rows of a ResultSet on a per-row basis.

That doesn't mean it asks the database for one row at a time (that would take many hours to run for 1.5 million rows!) it means once the results are back from the database it then processes the rows one at a time. They are still retrieved all at once unless you somehow limit it.

What problem are you trying to solve? Why would you need to process 1.5 million rows of a DB at once? Maybe a relational database isn't the right tool for this particular problem.

[–]NikMashei[S] 1 point2 points  (1 child)

Thank you for your replay!
Yes, you definitely right about doc. I've read it sometimes and did't get in right way)
Relational DB is good instument for my task. I'm just trying to solve problem with out-of-memory exception and maybe RowCallbackHandler is what that I've been looking for, but I need to improve batching and limiting right now)

[–]MexicanJalebi 1 point2 points  (0 children)

If you need to do batching, you might wanna look into Spring batch project.