[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4618) Support pagination: total rows ignore limit
Ahmed Medhat Osman (JIRA)
noreply at atlassian.com
Mon Oct 18 06:47:48 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38773#action_38773 ]
Ahmed Medhat Osman commented on HHH-4618:
-----------------------------------------
Dear friends, are there any update in this issue or are there any alternative solutions ?
> Support pagination: total rows ignore limit
> -------------------------------------------
>
> Key: HHH-4618
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4618
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Environment: JBoss 5.1.0GA
> Reporter: Dave
>
> Limit is used for pagination, but total number of rows must be known to calculate page count.
> Currently we have to use two queries:
> 1. select * from Student where age<30 limit 20;
> 2. select count(*) from Student where age<30;
> For complex query with joins/huge tables, it can be a performance issue.
> For Criteria API query with group by, there is no way to get row count, for example
> criteria.setProjection(Projection.projectionList().add(Projections.groupProperty("name")).add(Projections.sum(score)));
> Currently there is no way to get row count of this query using Criteria API.
> For MYSQL, SQL_CALC_FOUND_ROWS and FOUND_ROWS() are used to get row count ignoring limit.
> Pagination is used for all web application. Hibernate should support it in HQL and Criteria API.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list