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: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Wed, 17 Jul 2002 04:31:21 GMT
Message-ID: <tq6Z8.32914$Wt3.29440@rwcrnsc53>


This rarely happens, but sometimes it does. Why? In Oracle 8i the execution plan does not see the value of the bind variable and thus cannot make use of histograms. So in your case what is happening is that the execution plan is different in these two cases. Jim
"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
>
>
>
Received on Tue Jul 16 2002 - 23:31:21 CDT

Original text of this message

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