Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Getting multiple explain plans for 1 sql statement

RE: Getting multiple explain plans for 1 sql statement

From: Bobak, Mark <Mark.Bobak_at_il.proquest.com>
Date: Fri, 29 Sep 2006 17:36:40 -0400
Message-ID: <AA29A27627F842409E1D18FB19CDCF2709BA13FF@AABO-EXCHANGE02.bos.il.pqe>


One common occurrance which would cause that would be two different users executing the identical SQL, but resolving to two different objects.  

For example:
select '1' into :x from my_tab where rownum=1;  

if USER1 and USER2 each have their own table called my_tab.  

There are lots of other reasons. As Brandon (I think it was Brandon) mentioned previously, check V$SQL_SHARED_CURSOR, and check the documentation for the meaning of some of the columns in V$SQL_SHARED_CURSOR.   Hope that helps,  

-Mark  

-- 
Mark J. Bobak 
Senior Oracle Architect 
ProQuest Information & Learning 

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled.  --Richard P. Feynman, 1918-1988

 


________________________________
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of ryan_gaffuri_at_comcast.net Sent: Friday, September 29, 2006 5:34 PM To: Brandon.Allen_at_OneNeck.com; Allen, Brandon; oracle-l_at_freelists.org Cc: Allen, Brandon Subject: RE: Getting multiple explain plans for 1 sql statement why would I spawn child cursors with different execution plans for the exact same query with bind variables with the same plan_hash_value? -------------- Original message -------------- From: "Allen, Brandon" <Brandon.Allen_at_OneNeck.com> I forgot to mention - there could also be different explain plans for different child cursors of the same hash_value - check the "child_number" column, and then check v$sql_shared_cursor to get an idea of why there are multiple children.
________________________________
From: Allen, Brandon Sent: Friday, September 29, 2006 10:54 AM To: 'ryan_gaffuri_at_comcast.net'; oracle-l_at_freelists.org Subject: RE: Getting multiple explain plans for 1 sql statement It's normal to have multiple rows in v$sql_plan for a given hash_value - each row represents a single step of the explain plan. Do both rows have the same plan_hash_value? Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. -- http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 29 2006 - 16:36:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US