如何使用Hibernate批量选择数据? [英] How to do select the data in batches using hibernate?
本文介绍了如何使用Hibernate批量选择数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基本上从表中返回整个数据的函数。我可以如何实现批量读取,这样数据一次将以60,000行的批次返回。
以下逻辑适用于此场景吗?
http://javainnovations.blogspot.com/2008/07/batch-insertion-in-hibernate.html
hibernate.properties 中,使用参数设置批量大小。 $ b> $ b
hibernate.jdbc.batch_size ='your_value'
I have a function which basically returns the entire data from the table.How can i implement batch fetching so that the data will be returned in batches of 60,000 rows at a time.
Will the following logic applicable in this scenario?
http://javainnovations.blogspot.com/2008/07/batch-insertion-in-hibernate.html
解决方案
In hibernate.properties
, set the batch size using the parameter
hibernate.jdbc.batch_size= 'your_value'
这篇关于如何使用Hibernate批量选择数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文