Re: Bind Variable Peeking

  • From: Ray Feighery <rjfeighery@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 23 Nov 2006 03:47:13 +0000

Good question by Alex "how do you know that bind variable peeking happened?". I should change the subject as it is not really relevant in this case.


I assumed incorrectly that the execution path was dependent on whether bind variables or literals were used. In fact, as Wolfgang suggests, it was the query transformation engine recognizing that 50 OR statements can be resolved to 1 if the values are identical and it does this whether bind variables or literals are used.

Even when I replace the original statement with 50 different literal values, Oracle cannot (or does not) resolve the statement into a single OR statement.

So this just leaves me with the more basic question of why is the index not being used...

Thanks for the posts

Ray


--
//www.freelists.org/webpage/oracle-l


Other related posts: