I need to copy, on a daily basis, a very large (millions of rows) table from one DB2 DB to another, and I need to use perl and DBI.

Is there a faster way to do this than to simply fetchrow\_array each row from the first DB and insert them one-by-one into the second DB? Here's what I got:

```
$sth1 = $udb1 -> prepare($read_query);
$sth1 -> execute();
$sth1 -> bind_columns(\(@row{@{$sth1 -> {NAME_1c}}}));

$sth2 = $udb2 -> prepare($write_query);

while ($sth1 -> fetchrow_arrayref) {
    $sth2 -> execute($row{field_name_1}, $row{field_name_2});
}

```

I implemented some solutions from a similar thread, but it's still slow. Certainly there has to be a better way?