Re: Very big transaction in a stored procedure : how can i commit in the middle of it ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?
Date
Msg-id 5544.1180022456@sss.pgh.pa.us
Whole thread Raw
In response to Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?  (Célestin HELLEU <celestin.helleu@maporama.com>)
List pgsql-general
=?iso-8859-1?Q?C=E9lestin_HELLEU?= <celestin.helleu@maporama.com> writes:
> Well, with any database, if I had to insert 20 000 000 record in a table, I=
>  wouldntt do it in one transaction, it makes very big intermediate file, an=
> d the commit at the end is really heavy.

There may be some databases where the above is correct thinking, but
Postgres isn't one of them.  The time to do COMMIT, per se, is
independent of the number of rows inserted.

You need to find out where your bottleneck actually is, without any
preconceptions inherited from some other database.

            regards, tom lane

pgsql-general by date:

Previous
From: Célestin HELLEU
Date:
Subject: Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?