Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: 10046 trace - weird library misses
Raj,
This is exactly what happens. More than that, SQL is parsed just once, there
is even no soft parses then. PL/SQL - every time goes hard
Here is raw trace
PARSING IN CURSOR #1 len=50 dep=0 uid=40 oct=47 lid=40 tim=1045147633021608
hv=1118565285 ad='5416c120'
BEGIN :n := FNC_SP_GET_SUBID_BY_EXT_KEY (:v); END;
END OF STMT
PARSE #1:c=0,e=23499,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=0,tim=1045147633021588
FROM SUB, REF_STATUS
WHERE SUB.sub_status_id = REF_STATUS.status_id
AND status != 'deleted' AND SUB.external_key = :b1
WAIT #1: nam='SQL*Net message to client' ela= 5 p1=1413697536 p2=1 p3=0 EXEC #1:c=0,e=13751,p=0,cr=6,cu=0,mis=0,r=1,dep=0,og=4,tim=1045147634251723 WAIT #1: nam='SQL*Net message from client' ela= 1374129 p1=1413697536 p2=1p3=0
-----Original Message-----
Sent: Thursday, February 13, 2003 1:50 PM
To: Multiple recipients of list ORACLE-L
I wonder if soft parsing applies to pl/sql blocks as it applies to just plain sql?? do you see the sql inside the function parsed less times compared to execute?
Raj
Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
Sent: Thursday, February 13, 2003 11:39 AM
To: Multiple recipients of list ORACLE-L
Raj,
It's not dynamic.
>From SQLPlus prompt it looks like
SQL> BEGIN :n := FNC_SP_GET_SUBID_BY_EXT_KEY (:v); END; 2 /
Thank you,
-----Original Message-----
Sent: Thursday, February 13, 2003 10:44 AM
To: Multiple recipients of list ORACLE-L
Are you using dynamic sql? execute immediate? That might explain ... because exec immediate does a hard parse ... and it is documented too.
Raj
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
<mailto:vadim.gorbounov_at_liberate.com> ]
Sent: Thursday, February 13, 2003 9:49 AM
To: Multiple recipients of list ORACLE-L
Dear friends,
I traced one of our test cases and found something weird.
Did anybody else observe this?
Env:
server - 9.0.1.4, Solaris.
client - weblogic 7, uses original oracle thin 9.0.1 jdbc driver to connect.
In fact, I can reproduce all this from SQLPlus
Here is an excerpt from tkprof below - why every parse is a hard parse? Looks like the problem doesn't appear when 10046 is not set, and it appers ONLY on pl/sql blocks returning data to client, normal selects OK. Looks like bug again. Any workaround?
And what are these "Misses in library cache during execute"?
9.2.0.2 on Linux works fine, i.e. no misses once it has been parsed.
BEGIN :1 := FN_GET_STATUS_ID(:2,:3); END; call count cpu elapsed disk query current rows
Misses in library cache during parse: 40
Misses in library cache during execute: 40
Optimizer goal: CHOOSE
Parsing user id: 40
This select
select LOADED_VERSIONS, EXECUTIONS, LOADS,PARSE_CALLS, parsing_user_id
from v$sql
where sql_text like 'BEGIN :1 := FN_GET_STATUS_ID(:2,:3); END;';
gives out whole bunch of these record groups
LOADED_VERSIONS EXECUTIONS LOADS PARSE_CALLS PARSING_USER_ID
Thank you for you time
Vadim G
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net <http://www.orafaq.net> -- Author: Gorbounov,Vadim INET: vadim.gorbounov_at_liberate.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com <http://www.fatcity.com> San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Gorbounov,Vadim INET: vadim.gorbounov_at_liberate.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Feb 13 2003 - 15:30:10 CST