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

Home -> Community -> Mailing Lists -> Oracle-L -> FW: bind vars change explain plan

FW: bind vars change explain plan

From: Baker, Barbara <bbaker_at_denvernewspaperagency.com>
Date: Mon, 22 Jul 2002 07:08:20 -0800
Message-ID: <F001.0049DAC2.20020722070820@fatcity.com>


prem.
Never did get an answer to this question. I don't know why using bind variables changed the execution path. My best guess comes from the developer. She thinks that when we supplied the values, the optimizer knew what the range of values would be, and could therefore determine to use the index. With the bind variable, the optimizer did not have a range of values to work with and therefore did not choose the index in the execution path.

I have no knowledge that using bind variables will suppress indexes. Just happened that it did in this case.
Also keep in mind that this particular database is using an old version of Oracle (7.3.4). Optimizer got much better in version 8.

The list helped me out with a work-around, which was to index-hint the index I wanted.

Bind variables are definitely "good guys". I highly recommend you continue with your code changes to include binds.

Good luck.
Barb

> ----------
> From: oraora oraora[SMTP:oraoraora_at_rediffmail.com]
> Reply To: oraora oraora
> Sent: Sunday, July 21, 2002 8:24 PM
> To: bbaker_at_denvernewspaperagency.com
> Subject: Re: bind vars change explain plan
>
> Baker,
>
> sorry i did not read the reply to ur query.
> what was the reply ?
> will using bind vars suppress index ?
> kindly let me know b'coz i have also changed my code to SQL with
> bind vars just now.
>
> Regards,
> prem.
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Baker, Barbara
  INET: bbaker_at_denvernewspaperagency.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Mon Jul 22 2002 - 10:08:20 CDT

Original text of this message

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