[hibernate-dev] Keyset pagination support
Sanne Grinovero
sanne at hibernate.org
Sat Jan 16 06:15:46 EST 2016
I would love that. We actually discussed such an approach a couple of
years ago, but the context was not to implement pagination correctly
but to improve the performance of the Hibernate Search mass-indexer (a
batch process which iterates through all entities to rebuild the
Lucene index).
We eventually resolved that issue we had with transactions, but I
still wonder if using comparable keys would give us better
performance. The limitation is though that they need to be
comparable.. is that always the case, and if not do you think we can
figure it out easily from the SQL types?
BTW, the article you point to seems to imply that without this feature
it's impossible to do correct pagination, but while I'm not sure how
people use Hibernate nowadays, when I used it for something similar
within the JBoss Seam framework one would simply keep the
repeatable-read transaction going so there would be no
inconsistencies.
This makes me think though that it might be useful for Hibernate
Search users to be able to "freeze" the index view temporarily:
https://hibernate.atlassian.net/browse/HSEARCH-2080
On 16 January 2016 at 09:58, Vlad Mihalcea <mihalcea.vlad at gmail.com> wrote:
> Hi,
>
> I think it will be useful to consider adding support for Keyset pagination:
>
> http://use-the-index-luke.com/no-offset
>
> This could be a very strong feature that would set us apart from our
> competition.
>
> Vlad
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list