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

Home -> Community -> Usenet -> c.d.o.server -> Re: CBO histograms and bind variable

Re: CBO histograms and bind variable

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 11 Oct 2003 17:59:13 -0700
Message-ID: <1efdad5b.0310111659.53e0c2df@posting.google.com>


Sybrand Bakker <gooiditweg_at_sybrandb.nospam.demon.nl> wrote in message news:<vfkgov4dobcrjehd2lgamq57899vdckj6v_at_4ax.com>...
> On Sat, 11 Oct 2003 21:33:32 +0300, "Jarmo Blomster"
> <jarmo.blomster(RMVE.N0SPM)@mbnet.fi> wrote:
>
> >Hi,
> >
> >Can Oracle CBO utilize histograms when I use bind variables in SQL-query?
> >Is there differences between versions 8 and 9?
> >
> >//jarmo
> >
>
> CBO doesn't use histograms in version 8i. CBO should be capable to
> 'peek' in bind variables in 9i

This is not perfect. per kytes new book, if you use bind variables the query will be parsed once. This means if you have a skewed data set and have histograms, the histograms will be used the FIRST time when the sql query is parsed to build the execution plan, but will not use them again. This is because the execution plan is already parsed.

is this accurate? Received on Sat Oct 11 2003 - 19:59:13 CDT

Original text of this message

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