title: JPA Pagination: setFirstResult() and setMaxResults() : real pagination?
body: <p>Are the JPA setFirstResult() and setMaxResults() methods doing real pagination? I mean from the database point of view? or not?</p>
  
  <p>For example, if a query returns 1000000 rows, and I am paging with those methods by pages of 1000, will the database be queried in the end for 1000 or 1000000 rows?</p>
  
  <p>My point is: are those methods <em>only</em> there to limit the amount of entries retrieved to limit the memory footprint of the result of the query in the Java program or do they also serve as a way to be more conservative with the DBMS?</p>