On Tue, Jun 26, 2001 at 11:48:34PM +0800, Orlando Andico wrote:
> On Tue, 26 Jun 2001, Marcotullio, Angelo wrote:
> ..
> > In Oracle, the $sth->execute() builds the cursor and waits for the program
> > to start fetching records. The hints don't change this behavior, just the
> > access plan.
> ..
>
> Hrmmm... that's not what I've seen. I wrote some code which used
> Time::HiRes to measure the time taken at each step.. something like this:
>
> $t0 = [gettimeofday];
> $sth = $dbh->prepare ("SELECT * FROM TEN_MILLION_ROW_TABLE");
> print [gettimeofday] - $t0;
>
> $t0 = [gettimeofday];
> $sth->execute;
> # and so on..
>
> and definitely, the execute part took longest.. if what you're saying is
> true, execute would return immediately and let me fetch records at will.
> That does NOT happen. execute takes forever, THEN i can fetch records.
Nope, that's not what he's saying.
the total time taken for prepare, execute and all the fetches is lower
under the ALL_ROWS hint, than it is under the FIRST_ROWS. But there
are no guarantees about when the time is going to be occupied (but,
under FIRST_ROWS, the time taken for prepare, execute and *the first
fetch* is lower).
--
T.
- RE: Shorthand for $dbh->prepare and $sth->exec... Steven Lembark
- RE: Shorthand for $dbh->prepare and $sth->exec... Philip Mak
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->... Steven Lembark
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->exec... Orlando Andico
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->exec... Marcotullio, Angelo
- RE: Shorthand for $dbh->prepare and $sth->exec... 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->exec... Michael Peppler
- RE: Shorthand for $dbh->prepare and $sth->exec... Marcotullio, Angelo
- Re: RE: Shorthand for $dbh->prepare and $sth->... Ali Zaidi
- Re: Shorthand for $dbh->prepare and $sth->exec... Michael A Mayo
- Re: Shorthand for $dbh->prepare and $sth->exec... Philip Mak
- Re: Shorthand for $dbh->prepare and $sth->... Michael A Mayo
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
