I\'m writing a Django-ORM enchancement that attempts to cache models and postpone model saving until the end of the transaction. It\'s all almost done, however I came across
I've used 3 strategies for batch transactional work:
flush()
method against the Hibernate Session
, not the underlying JDBC connection. It accomplishes the same thing as JDBC batching.Incidentally, Hibernate also supports a batching strategy in collection fetching. If you annotate a collection with @BatchSize
, when fetching associations, Hibernate will use IN
instead of =
, leading to fewer SELECT
statements to load up the collections.