Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    });
    
    $dbh->disconnect;
    
  2. or download this
    dwalin@sol:/tmp$ perl test.pl 100 1000 100
    Benchmark: timing 100 iterations of new, old...
           new: 22 wallclock secs (22.10 usr +  0.28 sys = 22.38 CPU) @  4
    +.47/s (n=100)
           old: 10 wallclock secs ( 9.87 usr +  0.08 sys =  9.95 CPU) @ 10
    +.05/s (n=100)
    
  3. or download this
    $sth->execute(@$_) for @batch;
     # spent  10.0ms making 10000 calls to DBI::st::execute, avg 1µs/call
    
  4. or download this
     $sth->execute_array({}, @newdata);
    # spent  3.17s making 10 calls to DBI::st::execute_array, avg 317ms/ca
    +ll
    # spent  3.17s making 10 calls to DBD::_::st::execute_array, avg 317ms
    +/call