--- Mark Buckle <[EMAIL PROTECTED]> wrote:
> I've noticed that using a prepare/execute/fetch_xxxx cycle of operations
> appear to result in 2 parses happening. ( results obtained
> from tkprof ) Is this correct ? ie the parse count for the statement will
> be 2, the execute count 1, and the fetch count n.
Someone else observed this ~6 months ago, and I did a couple tests
at the time, but could not produce this behavior (I see one parse).
Just now I tried again, and I still see only one parse. So it
might be Oracle version and/or configuration specific (or possibly
query specific?) I don't have any theories though. Here's my
test case:
$dbh = DBI->connect('dbi:Oracle:..........);
$dbh->do("create table parse_test (c number)");
$dbh->do("alter session set sql_trace = true");
$c = $dbh->prepare('select * from parse_test');
$c->execute;
$c->fetchrow;
$dbh->do('drop table parse_test');
here's the tkprof excerpt:
************************************************************************
select *
from
parse_test
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0
Execute 1 0.00 0.00 0 0 0
Fetch 1 0.00 0.00 0 3 0
------- ------ -------- ---------- ---------- ---------- ----------
total 3 0.00 0.00 0 3 0
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 48
Rows Row Source Operation
------- ---------------------------------------------------
0 TABLE ACCESS FULL OBJ#(32398)
Mark
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com