On Tue, 26 Jun 2001, Sterin, Ilya wrote:
..
> Right. The first will fetch all rows, where the second can be stopped at
> any time.
..
> versus:
>
> $sth = $dbh->prepare("SELECT ...");
> $sth->execute;
> while ($row = $sth->fetchrow_hashref) {
> do something with $row
> }
This may be true, but as I understand it (vaguely), in Oracle, when you do
the execute it (by default) runs the query through and fetches all the
rows. Although this behavior can be changed using an optimizer hint
("return rows as quickly as possible") which I forgot right now..
I'm not sure if this is correct, btw. It's just that I've noticed when you
do large SELECTs in Oracle, the execute takes forever. When the execute
completes, a torrent of data comes in. So my conclusion that Oracle
executes the whole query first..
--
Orlando Andico <[EMAIL PROTECTED]>
Mosaic Communications, Inc.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GE d(-) s: a-25 C++++ UBLSI++++$ P+++ L+++>++++ E- W++ N(+)
o K? w O-- M- !V PS(++) PE- Y PGP-- t(+)@ 5(+) X++@ R(+) tv@
b++ DI++ G e++@ h--(*) r% y+
------END GEEK CODE BLOCK------
- Shorthand for $dbh->prepare and $sth->execute? Philip Mak
- RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->... Philip Mak
- RE: Shorthand for $dbh->prepare and $sth->... Steven Lembark
- RE: Shorthand for $dbh->prepare and $sth->... Philip Mak
- RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth... Steven Lembark
- RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
- Re: Shorthand for $dbh->prepare and $sth->... Orlando Andico
- RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->... Marcotullio, Angelo
- RE: Shorthand for $dbh->prepare and $sth->... Orlando Andico
- Re: Shorthand for $dbh->prepare and $sth... Tommy Wareing
- Re: Shorthand for $dbh->prepare and $sth... Michael A. Chase
- Re: Shorthand for $dbh->prepare and $sth... Tim Bunce
- RE: Shorthand for $dbh->prepare and $sth->... Michael Peppler
- RE: Shorthand for $dbh->prepare and $sth->... Marcotullio, Angelo
- Re: RE: Shorthand for $dbh->prepare and $sth... Ali Zaidi
