Batch insert algorithm

75 views
Skip to first unread message

Danilo Reinert

unread,
May 7, 2013, 2:47:11 PM5/7/13
to jd...@googlegroups.com
Does jDBI disable autocommit before performing a batch insert?

This is one suggestion of PostgreSQL documentation.


Atenciosamente,
Danilo Reinert

Steven Schlansker

unread,
May 7, 2013, 2:55:16 PM5/7/13
to jd...@googlegroups.com

On May 7, 2013, at 11:47 AM, Danilo Reinert <danilo...@gmail.com> wrote:

> Does jDBI disable autocommit before performing a batch insert?
>
> This is one suggestion of PostgreSQL documentation.
>
> See more at: http://www.postgresql.org/docs/current/interactive/populate.html.

It is probably best to just wrap your batches in an inTransaction block, rather
than relying on implicit behavior. Then it is clear both that it always happens,
even if jDBI changes for some reason, and it is clear to people reading the code.

Danilo Reinert

unread,
May 8, 2013, 3:13:30 PM5/8/13
to jd...@googlegroups.com
That makes sense!
Reply all
Reply to author
Forward
0 new messages