sorry for the vague question, as I do not know how to write it in proper sentence, if any of you wish to edit it to something more meaningful please go ahead.
I actually wanted to ask, when we do something like this:
Select * from TableWithBillionRecords Limit 1000000
using either result set:
PreparedStatement.executeQuery()
or Hibernate:
getCurrentSession().createQuery(query).list()
Once the line is executed, does it means the web server is actually pulling out the whole 1 million rows from my database server? Or is there some streaming logic lies behind the interface?
Thanks for the information as it helps me in deciding whether or not I should break it to multiple queries selecting chunk by chunk or if it is actually alright to just select it one whole bunch.
Thanks again guys.