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: Multiple parses with bind variables

RE: Multiple parses with bind variables

From: Josh Collier <Josh.Collier_at_Banfield.net>
Date: Wed, 20 Aug 2003 12:44:31 -0800
Message-ID: <F001.005CBCE0.20030820124431@fatcity.com>


The application that is running this, or the connection thinger (ODBC, JDBC, DBI) is parsing it twice. They often do a describe before a parse, which results in two parses for every execution.

 945 * 2 = 1895

Josh

-----Original Message-----
Sent: Wednesday, August 20, 2003 1:34 PM To: Multiple recipients of list ORACLE-L

Why should a query such as this, with bind variables and no literals, be parsed so many times? Other queries in the trace show, for example, 2 parses and 160000 executions. And while I'm at it, why does is the parse count shown equal to the SUM of executes and fetches?

SELECT BENEFICIARY_FK, BENEFICIARY_PHONE_PK, PHONE_TYPE_FK, PHONE_NUMBER
FROM BENEFICIARY_PHONE WHERE COMPANY_FK = :V00001 AND BENEFICIARY_FK IN ( :V00002)    call count cpu elapsed disk query current     

Execute    945      0.04       0.08          0          0          0   
       
Fetch      945     38.48      43.24          0     620428          0





Paul Baumgartel
Transcentive, Inc.
www.transcentive.com

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Paul Baumgartel
  INET: treegarden_at_yahoo.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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Josh Collier
  INET: Josh.Collier_at_Banfield.net
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 Wed Aug 20 2003 - 15:44:31 CDT

Original text of this message

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