[Phoenix-pm] PERL DBI
Loo, Peter # PHX
Peter.Loo at source.wolterskluwer.com
Mon Mar 13 14:44:37 PST 2006
Hey Guys,
I changed the commit to every 5000 records from auto commit and used
fetchrow_arrayref instead of fetchrow_array and the result was GREAT.
START: Mon Mar 13 15:27:57 MST 2006
END: Mon Mar 13 15:41:18 MST 2006
Peter Loo
Wolters Kluwer Health
(602) 381-9553
-----Original Message-----
From: Brock [mailto:awwaiid at thelackthereof.org]
Sent: Monday, March 13, 2006 3:11 PM
To: Loo, Peter # PHX
Cc: Bill Nash; Scott Walters; phoenix-pm at pm.org
Subject: Re: [Phoenix-pm] PERL DBI
Best to make it explicity by putting
AutoCommit => 0
in your dbh setup. Then do $dbh->commit every now and then.
Also, almost but not quite completely unrelated, someting I like to use
for pretty and quick progress reports is "\r", which will go back to the
beginning of the line but not the next.
So:
while(...) {
print "Now processing record $n/$total\r";
# or maybe every 1000th record
print "Now processing record $n/$total\r" unless $n % 1000;
...
}
print "\ndone.\n";
--Brock
On 2006.03.13.15.01, Loo, Peter # PHX wrote:
|
| Hi,
|
| I was wondering if auto commit is turned on by default. Perhaps my
| process is committing for each row.
|
| Peter Loo
| Wolters Kluwer Health
| (602) 381-9553
This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.
This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message.
More information about the Phoenix-pm
mailing list