Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: Commit ever...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3397 of 3559
Post > Topic >>

Re: Commit every processed record

by Bart.Degryse@[EMAIL PROTECTED] ("Bart Degryse") Apr 7, 2008 at 04:22 PM

--=__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/re****ting/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" <andreas.kretschmer@[EMAIL PROTECTED]
> 2008-04-07 15:01 =
>>>
am  Mon, dem 07.04.2008, um 14:46:50 +0200 mailte luke.78@[EMAIL PROTECTED]
 =
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@[EMAIL PROTECTED]
)
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

<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Well, actually there is.</DIV>
<DIV>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.</DIV>
<DIV>Try to start that perl connection outside the function or your =
performance will drop too much.</DIV>
<DIV>I use this technique to fetch, process and store&nbsp;records from an
=
oracle db (erp)&nbsp;in a postgresql db
(datawarehousing/re****ting/external=
 data).</DIV>
<DIV>It gets me some 500,000 records in little over 50 minutes.</DIV>
<DIV>Probably real perl addicts would have a lot to say about my coding, =
but being a perl illiterate (does&nbsp;one write it like this?)&nbsp;I =
must say that I'm quite happy with the result.</DIV>
<DIV>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 =
</DIV>
<DIV>basic things like hashes (yes, illiterate !-) and EMS SQL
Manager.</DI=
V>
<DIV>Good luck<BR><BR>&gt;&gt;&gt; "A. Kretschmer"
&lt;andreas.kretschmer@[EMAIL PROTECTED]
 2008-04-07 15:01 &gt;&gt;&gt;<BR>am&nbsp; Mon, dem =
07.04.2008, um 14:46:50 +0200 mailte luke.78@[EMAIL PROTECTED]
 folgendes:<BR>&gt;
=
Hi,<BR>&gt; I have to execute commit for evey record that i processed =
during a cursor fetch in a function.<BR>&gt; There is a way to do =
it?<BR><BR>No.<BR><BR><BR>Regards, Andreas<BR>-- <BR>Andreas
Kretschmer<BR>=
Kontakt:&nbsp; Heynitz: 035242/47150,&nbsp;&nbsp; D1: 0160/7141639 (mehr:
=
-&gt; Header)<BR>GnuPG-ID:&nbsp;&nbsp; 0x3FFF606C, privat
0x7F4584DA&nbsp;&=
nbsp; <A
href=3D"http://wwwkeys.de.pgp.net/">http://wwwkeys.de.pgp.net</A><=
BR><BR>-- <BR>Sent via pgsql-sql mailing list
(pgsql-sql@[EMAIL PROTECTED]
)<BR=
>To make changes to your subscription:<BR><A
href=3D"http://www.postgresql.=
org/mailpref/pgsql">http://www.postgresql.org/mailpref/pgsql</A>-sql<BR></D=
IV></BODY></HTML>

--=__PartCAEC7A31.0__=--
 




 1 Posts in Topic:
Re: Commit every processed record
Bart.Degryse@[EMAIL PROTE  2008-04-07 16:22:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 20:12:23 CDT 2008.