Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $statement = 'select a.foo, b.bar from local a, remote@my_database_link b where a.baz = b.baz (+) and a.parm1 = 1 and b.parm2 = 2'; my $ary_ref = $dbhandle->selectall_arrayref($statement); # this execut +es in less than a second $statement = 'select a.foo, b.bar from local a, remote@my_database_link b where a.baz = b.baz (+) and a.parm1 = ? and b.parm2 = ?'; my $sth = $dbhandle->prepare($statement); my $rv = $sth->execute(1,2); # this takes 25+ seconds to execute $ary_ref = $sth->fetchall_arrayref(); # this takes milliseconds
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI & DBD::Oracle -- Executing a statement handle across a database link
by mje (Curate) on Jan 07, 2010 at 09:17 UTC | |
by Anonymous Monk on Jan 07, 2010 at 18:11 UTC |