anar wrote:
The batch size you are updating is for jdbc-batch -
Quote:
A non-zero value enables use of JDBC2 batch updates by Hibernate.
eg. recommended values between 5 and 30
I think the one you want to update is -
hibernate.default_batch_fetch_size
Hmm, I added this setting so that I now have:
Code:
<property name="hibernate.default_batch_fetch_size">30</property>
<property name="hibernate.jdbc.batch_size">50</property>
<property name="hibernate.jdbc.fetch_size">25</property>
When I ask for a batch of 60 items I still get 60 SQL statements printed on the console. I verified that the properties are being picked up by the Settings class. The BatchingEntityLoader class is also being invoked.
This is strange. The approach I'm using is this: I compute the identifier for each of the entities being requested, call Session.get() on each of the identifiers, and the finally access the entitties (map instances). The SQL statements being printed are exactly the same (e.g. WHERE item0_.ITEM_ID=?) and do not have an IN clause (e.g. WHERE item0_.ITEM_ID IN (1,2,3).
Any ideas on how to home in on where the problem is?
Thanks,
-Kaare