in reply to DBI & DBD::Oracle -- Executing a statement handle across a database link

I've had a similar issue before myself and I'd guess an index is not being used. By default DBD::Oracle binds all parameters as strings and this can lead to Oracle deciding that since the parameter is a string and that does not match an integer then the index will not be used. Remove your parameters and just do the entire SQL as a string and see if that improves it. If it does, you have probably hit this problem. Then you need to look at ora_type => ora_xxx and SQLCS_IMPLICIT. Search for my posting on the dbi-users list in the last 4 years where I had the same issue.

  • Comment on Re: DBI & DBD::Oracle -- Executing a statement handle across a database link

Replies are listed 'Best First'.
Re^2: DBI & DBD::Oracle -- Executing a statement handle across a database link
by Anonymous Monk on Jan 07, 2010 at 18:11 UTC

    Thank you. I'll take a look at applying this recommendation for numeric parameters:


    $sth->bind_param(1, $parm1, { ora_csform => SQLCS_IMPLICIT });

    Unfortunately, the problem has 'magically' resolved itself, without any (known) tinkering with Oracle or my code. I guess I'll have to wait until the problem resurfaces before I can test this out.