[英]Drawbacks of a high hibernate.jdbc.batch_size setting
I increased the hibernate.jdbc.batch_size
parameter to 50. This makes batch processings in our application a lot faster, which is great. 我将
hibernate.jdbc.batch_size
参数增加到50.这使我们的应用程序中的批处理更快,这很好。 Do I need to expect any drawbacks for the "regular" tasks of the application? 我是否需要预期应用程序的“常规”任务有任何缺点? The application responds to web requests and uses a single database connection per request.
应用程序响应Web请求,并为每个请求使用单个数据库连接。 Most of the requests read only from the database, some requests save a few objects (but not hundreds).
大多数请求只从数据库中读取,一些请求保存了一些对象(但不是数百个)。
Thank you very much for sharing your experiences. 非常感谢您分享您的经验。
The hibernate.jdbc.batch_size
parameter determines how many statements are send to the database in one call. hibernate.jdbc.batch_size
参数确定在一次调用中向数据库发送的语句数。 Having to many statements (a higher number) could result in either an OutOfMemoryException or a timeout on the transaction, when doing multiple statements in a transaction. 在事务中执行多个语句时,必须有许多语句(更高的数字)可能导致OutOfMemoryException或事务超时。
With webrequests you usually have less statements in a transaction. 对于webrequests,您通常在事务中使用较少的语句。 This setting shouldn't influence these transactions.
此设置不应影响这些交易。
Depending on which part of the documentation you read, anywhere between 10 and 50 Hibernate 3.3 chapter 13 or 5 and 30 Hibernate 3.3 chapter 3 is reasonable / recommended. 根据您阅读的文档的哪一部分,在10到50之间的任何地方, Hibernate 3.3第13章或第5 章和第 30 章Hibernate 3.3第3章都是合理/推荐的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.