[Phoenix-pm] PERL DBI

Brock awwaiid at thelackthereof.org
Mon Mar 13 14:11:26 PST 2006


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


More information about the Phoenix-pm mailing list