Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Célestin HELLEU <celestin(dot)helleu(at)maporama(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?
Date: 2007-05-24 16:00:56
Message-ID: 5544.1180022456@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?C=E9lestin_HELLEU?= <celestin(dot)helleu(at)maporama(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-05-24 16:06:11 Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?
Previous Message Célestin HELLEU 2007-05-24 15:34:00 Re: Very big transaction in a stored procedure : how can i commit in the middle of it ?