Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] A question of native query for pagination.

Hello,

 

I am using a native query to get a paginated data from the DB(Oracle). However I don’t see the ROWNUM and FIRST_ROWS hint being added to the query. I referred to the discussion at http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg03084.html, however I am not clear about the below response from Chris

 

That is not entirely true. For maxRows, a native query or non-paginated query will use statement.setMaxRows(). So depending on how the driver implements this, it should not be sending the entire result set. FirstResult is used to jump to the first row on the returned resultset though.

Would database still return the full results set to the driver on the application server and driver would then hand over only a page of data to the application code or the DB itself would provide only the page of data to the application?

 

We have an application where database CPU is hitting 100% quickly and remains high for the user load. I am also working on tuning the queries, however want to even know if there is anything else I am missing here.

 

Would appreciate any help.

 

Thanks,
Shashi

 


Back to the top