Hibernate pagination performance problem

Description

The new version of Hibernate 4.1.5.SP1 contains a performance problem in pagination using SQL Server 2005.

When we are handling a large amount of data, paging performance decreases significantly as we navigate on the pages.

The query generated for paging, brings all objects in the table (the most extreme case, the last page), only then filter the page data based on rownumber.

When we are working with millions of records is not acceptable to use pagination.

Attachments

1

Activity

RuiLAugust 8, 2012 at 7:12 PM

Screenshot with the test results executed with two versions of hibernate (4.1.4, 4.1.5).

The difference in execution time of the same query with the different versions of hibernate is huge.

To show the page of records between 500,001 and 500,011, in version 4.1.4 takes ten seconds, in version 4.1.5 takes three minutes and thirty seconds.

Details

Assignee

Reporter

Priority

Created August 6, 2012 at 5:58 PM
Updated August 8, 2012 at 7:12 PM