title: Hibernate Criteria Limit mechanism?
body: <p>Hibernate Criteria support provides a <code>setMaxResults()</code> method to limit the results returned from the db.</p>
  
  <p>I can't find any answer to this in their documentation - how is this implemented? Is it querying for the entire result set and then returning only the request number? Or is it truly limiting the query on the database end (think LIMIT keyword as in mySql).</p>
  
  <p>This is important because if a query could potentially return many many results, I really need to know if the <code>setMaxResults()</code> will still query for all the rows in the database (which would be bad).</p>
  
  <p>Also - if its truly limiting the number of rows on the database end, how is it achieving this cross-db (since I don't think every rdbms supports a LIMIT functionality like mySql does).</p>