in reply to DBI Perl Oracle , returs less number of rows than actual number

How are you getting the rowcount? Are you actually fetching the rows and incrementing a counter for each? Or are you looking at the return value for execute()?

Chris
M-x auto-bs-mode

  • Comment on Re: DBI Perl Oracle , returs less number of rows than actual number

Replies are listed 'Best First'.
Re: Re: DBI Perl Oracle , returs less number of rows than actual number
by learn_forever (Acolyte) on May 31, 2002 at 02:51 UTC
    I tried both options
    1. $sth->rows;
    2. fetching all records and the using a counter to itearte through the array.

    Both way I get max 30787 records.

      Only the second way will work. The first is for finding how many rows were affected by an UPDATE/DELETE operation.

      Since DBD::Oracle uses the same libraries as SQL*Plus, that strongly leads me to look at some difference between the Perl invocation and the SQL*Plus invocation: how the queries are constructed, who is creating the query, how are the results fetched.

      Also, what happens when you issue a SELECT COUNT(*) FROM foo WHERE ... in each of the environments?

      Chris
      M-x auto-bs-mode