Re: autocommit (true/false) for more than 1 million records - Mailing list pgsql-performance

From Stephen Frost
Subject Re: autocommit (true/false) for more than 1 million records
Date
Msg-id 20140822210018.GZ16422@tamriel.snowman.net
Whole thread Raw
In response to autocommit (true/false) for more than 1 million records  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: autocommit (true/false) for more than 1 million records
List pgsql-performance
* Emi Lu (emilu@encs.concordia.ca) wrote:
> Hello,
>
> Trying to insert into one table with 1 million records through java
> JDBC into psql8.3. May I know (1) or (2) is better please?
>
> (1) set autocommit(true)
> (2) set autocommit(false)
>      commit every n records (e.g., 100, 500, 1000, etc)

It depends on what you need.

Data will be available to concurrent processes earlier with (1), while
(2) will go faster.

    Thanks,

        Stephen

Attachment

pgsql-performance by date:

Previous
From: David G Johnston
Date:
Subject: Re: autocommit (true/false) for more than 1 million records
Next
From: Emi Lu
Date:
Subject: Re: autocommit (true/false) for more than 1 million records