On Wed, Nov 24, 1999 at 07:48:24AM -0800, Randal L. Schwartz wrote: > > my @FIELDS = > qw(when host method url user referer browser status bytes > wall cpuuser cpusys cpucuser cpucsys); > my $INSERT = > "INSERT INTO $DB_TABLE (". > (join ",", @FIELDS). > ") VALUES(". > (join ",", ("?") x @FIELDS). > ")"; > eval { > my $dbh = DBI->connect($DSN, (split ':', $DB_AUTH), > { RaiseError => 1 }); > my $sth = $dbh->prepare($INSERT); > $sth->execute(@data); > $sth->finish; > $dbh->disconnect; > }; > if ($@) { > $r->log->error("dbi: $@"); > } Changing the prepare to prepare_cached would save you some cpu time. Also, the finish call is redundant here. Tim.
- embperl pages and braindead sucking robots Jens-Uwe Mager
- RE: embperl pages and braindead sucking robots Gerald Richter
- Limiting CPU (was Re: embperl pages and braind... Randal L. Schwartz
- Re: Limiting CPU (was Re: embperl pages an... Randal L. Schwartz
- Installation help Tim Bunce
- Installation help apache
- Re: Installation help Cliff Rayman
- Installation help apache
- Re: Installation help Cliff Rayman
- Re: Limiting CPU (was Re: embperl pages an... Doug MacEachern
- Re: Limiting CPU (was Re: embperl page... Randal L. Schwartz
- Re: Limiting CPU (was Re: embperl... Doug MacEachern
- Re: Limiting CPU (was Re: emb... Doug MacEachern
- Re: Limiting CPU (was Re:... Randal L. Schwartz
- Re: Limiting CPU (was Re: embperl... Eric L. Brine