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: immediate value vs bind variable

Re: immediate value vs bind variable

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 16 Jul 2002 23:19:45 +0200
Message-ID: <uj93nqhhlo9t5c@corp.supernews.com>

"Syltrem" <syltremspammenot_at_videotron.com> wrote in message news:IY%Y8.6315$H67.33359_at_tor-nn1.netcom.ca...
> Hi
>
> I don't know where to start looking in the doc to find the answer /
solution
> to this:
>
> a WHERE TABLE_COLUMN > bind_variable
> takes significantly longer than a
> WHERE TABLE_COLUMN > 'immediate value'
>
> The TABLE_COLUMN is a CHAR(2)
>
> Whether I declare the bind variable as a char or varchar don't make a
> difference, it's always longer when using the bind variable. Exapmle: 0.23
> seconds (immediate value) compared to 7.67 seconds (bind variable).
>
> Suggestions please!
>
> Thanks
> --
>
> Syltrem
> http://pages.infinit.net/syltrem (OpenVMS related web site - en français)
> To reply to myself directly, remove .spammenot from my address
>
>
>

Posting a version is asked too much I guess. Details about this issue can be found in 'Designing Oracle for Performance' aka the performance tuning manual, and in numerous posts in the google archives that no one cares to search.

The issue is the CBO (until I believe 8.1.7 EE) can't 'look' into bind variables and hence can't check the content of the bind variable against histograms present. Of course if you never did create histograms, it wouldn't make any difference.

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Tue Jul 16 2002 - 16:19:45 CDT

Original text of this message

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