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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
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 14:48:16
Message-ID: 20070524144816.GA3922@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 24, 2007 at 03:59:15PM +0200, Célestin HELLEU wrote:
> Hi,
>
> I already know that transaction is impossible inside a function, but I think I really need a way to counter this
>
> I have a stored procedure in pl/sql that makes about 2 000 000
> insert. With the way it works, PostGreSQL il making a unique
> transaction with all this, resulting so bad performances I can't wait
> the procedure to finish

In general making seperate transactions slows things down, not speeds
things up. Have you actually check what the cause of the slowness is?
Are there any triggers, foreign key, etc defined. Is the query in the
loop fast enough?

You're going to have to provide more details.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben Trewern 2007-05-24 15:15:18 Re: why postgresql over other RDBMS
Previous Message Célestin HELLEU 2007-05-24 14:30:19 Very big transaction in a stored procedure : how can i commit in the middle of it ?