Re: Batch Inserts - Mailing list pgsql-general

From Doug Fields
Subject Re: Batch Inserts
Date
Msg-id 5.1.0.14.2.20021211180132.021d39e8@pop.pexicom.com
Whole thread Raw
In response to Urgent need of (paid) PostgreSQL support in New York City area  (Doug Fields <dfields-pg-general@pexicom.com>)
List pgsql-general
Hi Ricardo, list,

One quick question:

>         - If your "data importing" is done via inserts, make sure that the
>batch uses transactions for each (at least or so) 200 inserts. If you
>don't, each insert will be a transaction, what will slow down you.

I use JDBC and use it with the default "AUTOCOMMIT ON."

Does doing a statement, in one JDBC execution, of the form:

BEGIN WORK; INSERT ... ; INSERT ... ; INSERT ...; COMMIT;

Count as N individual inserts (due to the autocommit setting) or does the
BEGIN WORK;...COMMIT; surrounding it override that setting?

Thanks,

Doug


pgsql-general by date:

Previous
From: Ian Barwick
Date:
Subject: Re: [ADMIN] 7.2.x -> 7.3 upgrade docs?
Next
From: Toby Tremayne
Date:
Subject: Re: refursor from dynamic query