Hi,

I've got a problem with a simple fetch which just takes hours (literaly) to
complete.
It's a simple select statement which, in the current case, returns about 300
rows within seconds.
But the loop is finished a couple of hours later then the last result is
printed.
Here's a code snippet:

        my $SQL = "select oh_deliverynumber, ol_linereference,
oh.batchrunidentifier, oh.transactiondate
                 from orderheader oh, orderline ol
                 where ol_linereference not in (select sc_linereference from
shipconfirm)
                 and oh_deliverynumber=ol_deliverynumber
                 and
to_date(oh.transactiondate,'YYYYMMDDHH24MISS')+8<=sysdate";

        my $Statement = $Database->prepare($SQL);

        if (defined($Database->errstr)) {
                $Rollback=1;
                warn $Database->errstr;
        }
        
        $Statement->execute();
        if (defined($Statement->errstr)) {
                $Rollback=1;
                warn $Statement->errstr;
        }
        if (defined($Statement->fetchrow_array)) {
                $Rollback=1;
                warn $TextOnResult;
                my @row;
                while ( @row = $Statement->fetchrow_array ) {
                        warn "@row\n";
                }
        }

So for me it looks like the fetchrow_array function doesn't notice that
there are no more rows to fetch.
But I don't know whether it's my database, the DBD::Oracle module or DBI
itself.
Has anyone experienced the same?
Any other idea?

DBI: 1.45
DBD::Oracle 1.16
Oracle client: 8.1.7.0
Database: 8.1.7.2

Best regards,

Olly


Reply via email to