Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: binding values in IN(:1, :2,:3)
I think you are defeating the purpose of binding variables in the IN clause. Since the number of variables can and often will vary...The Oracle Parser will have to reparse the statement, so you will not be gaining any performance.
In regards to performance, try to avoid using the IN clause whenever
possible.
It usually is very inefficient and cause Nested Loops. You should
use the EXISTS statement instead.
GV
"Rene Nyffenegger" <rene.nyffenegger_at_audatex.KEINESPAM.ch> wrote in message
news:996as2$730$1_at_news1.sunrise.ch...
> Hi
>
> I am trying to bind values in the IN clause of an SQL statement
> using OCI.
>
> select sth from stbl where sth_id in (:1, :2, :3)
>
> Almost needless to say that the count of parameters in the in clause
> varies.
>
> Can that be achieved and if yes: how
>
> tia
>
> Rene
>
>
>
Received on Tue Mar 20 2001 - 10:15:44 CST
![]() |
![]() |