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: Oracle position on hints

Re: Oracle position on hints

From: Bjørn Engsig <bjorn_at_miracleas.dk>
Date: Tue, 11 Mar 2003 09:00:08 -0800
Message-ID: <F001.0056640A.20030311090008@fatcity.com>


Seems like we are starting Yet Another Bind Discussion!

Anyway, the peeking into bind variables is basically done when a hard parse is done. Hence, if multiple sessions execute the same shared SQL statement, only the first one will actually do the peek and hence, the optimization for all executions in all sessions will be as this first one.

In my opinion, cursor_sharing and bind variable peeking should be useless features. However, I realize there are some incorrectly written applications out there that can have marginal need for them.

/Bjørn.

Jared.Still_at_radisys.com wrote:

>>From the performance tuning guide:
>
>The CBO peeks at the values of user-defined bind variables on the first
>invocation of a cursor. This feature lets the optimizer determine the
>selectivity of any WHERE clause condition, as well as if literals have been used instead of bind
>variables. On subsequent invocations of the cursor, no peeking takes
>place, and the cursor is shared, based on the standard cursor-sharing
>criteria, even if subsequent invocations use different bind values.
>
>CBO only peeks the bind variable once, so that wouldn't help much
>for star transforms and histograms.
>
>Jared
>
>
>
>
>
>
>"Jesse, Rich" <Rich.Jesse_at_qtiworld.com>
> 03/10/2003 01:39 PM
>
>
> To: "'ORACLE-L_at_fatcity.com'" <ORACLE-L_at_fatcity.com>
> cc: "'Jared.Still_at_radisys.com'" <Jared.Still_at_radisys.com>
> Subject: RE: Oracle position on hints
>
>
>I thought that went out the window with 9i because it can snoop at the
>bind
>variables??
>
>Rich
>
>Rich Jesse System/Database Administrator
>rich.jesse_at_qtiworld.com Quad/Tech International, Sussex, WI USA
>
>
>-----Original Message-----
>Sent: Monday, March 10, 2003 12:09 PM
>To: Multiple recipients of list ORACLE-L
>
>
>Well, I wouldn't say you should *always* use bind variables.
>
>Many situations in a database warehouse preclude that.
>
>Potentially long running queries may need to have literals
>to help the CBO make the right choice.
>
>Star transforms don't work with bind variables, and histograms
>can't be used with bind variables.
>
>Jared
>
>
>
>
>
>
>"Nicoll, Iain" <IAIN.D.NICOLL_at_saic.com>
>Sent by: root_at_fatcity.com
> 03/08/2003 06:23 AM
> Please respond to ORACLE-L
>
>
> To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
> cc:
> Subject: RE: Oracle position on hints
>
>
>Given the attitude of most dba's that you should always use bind variables
>where possible I can't see how you'd cope with skewed data without them.
>Most developers should know a databases's data better than the optimiser
>and
>certainly when building queries it's always worthwhile seeing where data
>is
>being most effectively filtered.
>
>There are lots of mature systems out there where the data characteristics
>are unlikely to change much and for most in-house developers you're never
>going to have to think about portability but always about performance.
>
>Iain Nicoll
>-----Original Message-----
>Sent: 07 March 2003 16:04
>To: Multiple recipients of list ORACLE-L
>
>
>Hi,
>
>Does Oracle have an official position on hints ?
>Will they go away as the optimiser is becoming bettre or they are there to
>stay ?
>
>TIA
>
>
>
>Stephane Paquette
>
>
>Administrateur de bases de donnees
>
>Database Administrator
>
>Standard Life
>
>www.standardlife.ca
>
>Tél. (514) 925-7187
>
>stephane.paquette_at_standardlife.ca <mailto:stephane.paquette_at_standardlife.ca>
>
>
>
>
>

-- 
Bjørn Engsig, Miracle A/S
Member of Oak Table Network <http://www.oaktable.net>
Bjorn.Engsig@MiracleAS.dk - http://MiracleAS.dk



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: =?ISO-8859-1?Q?Bj=F8rn_Engsig?=
  INET: bjorn_at_miracleas.dk

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 Tue Mar 11 2003 - 11:00:08 CST

Original text of this message

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