copying a very large table from one DB2 to another, using perl and DBI
问题 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(