Contents

FirstResult/MaxRows

The JPA Query object contains support for configuring the first and max rows to retrieve when executing a query. By default EclipseLink translated thes values into the parameters provided to the JDBC statement. This then leaves it up the JDBC driver to handle the range of rows requested. In many JDBC implementations this provides little performance value as the database does not limit the rows returned but they are instead filtered on the JDBC client.

Database Specific SQL

EclipseLink's target database platform enables the generation of native SQL that can more optimally retrieve a set of rows.

Oracle ROWNUM

When the target platform is Oracle then ROWNUM is used in the generated SQL in addition to a hint to retrieve a page of results.

Other Databases

At present there is not yet custom SQL support for other database vendors but this needs to be addressed and some bugs have been filed. If you require this support please post a message on the newsgroup so that the work can be properly prioritized based on demand.

Chunking using PKs with IN

This involve performing a query on the database for all of the primary key values that match the criteria and then using these values to retieve specific sets.