Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id E55142E0048 for ; Mon, 7 Apr 2008 11:22:36 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 76387-01 for ; Mon, 7 Apr 2008 11:22:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from interscan.indicator.com (unknown [193.121.199.3]) by developer.postgresql.org (Postfix) with ESMTP id CF0162E003C for ; Mon, 7 Apr 2008 11:22:32 -0300 (ADT) Received: from DOMEXT-MTA by WEBACCESS.INDICATOR.BEwith Novell_GroupWise; Mon, 07 Apr 2008 16:22:29 +0200 Message-Id: <47FA4A40.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Mon, 07 Apr 2008 16:22:25 +0200 From: "Bart Degryse" To: , "A. Kretschmer" Subject: Re: Commit every processed record References: <20080407130140.GG26954@a-kretschmer.de> In-Reply-To: <20080407130140.GG26954@a-kretschmer.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartCAEC7A31.0__=" X-imss-version: 2.050 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/46 X-Sequence-Number: 30585 --=__PartCAEC7A31.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Well, actually there is. Do the processing in a plperlu function which uses it's own connection to = the db. Then every instance of the function will have it's own transaction.= Try to start that perl connection outside the function or your performance = will drop too much. I use this technique to fetch, process and store records from an oracle db = (erp) in a postgresql db (datawarehousing/reporting/external data). It gets me some 500,000 records in little over 50 minutes. Probably real perl addicts would have a lot to say about my coding, but = being a perl illiterate (does one write it like this?) I must say that I'm = quite happy with the result. All I used was the perl chapter in the postgresql manual (big hurray for = the manual), perl express for testing and debugging of a lot of very=20 basic things like hashes (yes, illiterate !-) and EMS SQL Manager. Good luck >>> "A. Kretschmer" 2008-04-07 15:01 = >>> am Mon, dem 07.04.2008, um 14:46:50 +0200 mailte luke.78@libero.it = folgendes: > Hi, > I have to execute commit for evey record that i processed during a = cursor fetch in a function. > There is a way to do it? No. Regards, Andreas --=20 Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ( = http://wwwkeys.de.pgp.net/ ) --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql --=__PartCAEC7A31.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
Well, actually there is.
Do the processing in a plperlu function which uses it's own connection= to the db. Then every instance of the function will have it's own = transaction.
Try to start that perl connection outside the function or your = performance will drop too much.
I use this technique to fetch, process and store records from an = oracle db (erp) in a postgresql db (datawarehousing/reporting/external= data).
It gets me some 500,000 records in little over 50 minutes.
Probably real perl addicts would have a lot to say about my coding, = but being a perl illiterate (does one write it like this?) I = must say that I'm quite happy with the result.
All I used was the perl chapter in the postgresql manual (big hurray = for the manual), perl express for testing and debugging of a lot of very =
basic things like hashes (yes, illiterate !-) and EMS SQL Manager.
Good luck

>>> "A. Kretschmer" <andreas.kretschmer@s= chollglas.com> 2008-04-07 15:01 >>>
am  Mon, dem = 07.04.2008, um 14:46:50 +0200 mailte luke.78@libero.it folgendes:
> = Hi,
> I have to execute commit for evey record that i processed = during a cursor fetch in a function.
> There is a way to do = it?

No.


Regards, Andreas
--
Andreas Kretschmer
= Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: = -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA &= nbsp; http://wwwkeys.de.pgp.net<= BR>
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
--=__PartCAEC7A31.0__=--