title: Read SQL Database in batches
body: <p>I am using <code>Java</code> to read from a <code>SQL RDBMS</code> and return the results to the user. The problem is that the database table has <code>155 Million rows</code>, which make the wait time really long. </p>
  
  <p>I wanted to know if it is possible to retrieve results as they come from the database and present them incrementaly to the user (in batches). </p>
  
  <p>My query is a simple <code>SELECT * FROM Table_Name query</code>. </p>
  
  <p>Is there a mechanism or technology that can give me callbacks of DB records, in batches until the <code>SELECT</code> query finishes?</p>
  
  <p>The RDBMS that is used is MS SQL Server 2008.</p>
  
  <p>Thanks in advance.</p>