Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 1=1
Joel Garry wrote:
> I was hoping that wouldn't be the answer. But... it's the _last_
> one...
> [and I've seen others ending with AND 1=1) AND 1=1)]
>
> I just have some vague memory from years ago that it had some sort
> of useful effect in rule-based.
>
> jg
Maybe the 1=1 on the end is tacked on as a result of not selecting
anything from a drop-down list on the UI (as the value of the default
item). I suspect the cost-based optimizer throws away the 1=1 clauses
anyhow (no matter where they are).
You might be remembering the old tricks we used on the rule-based optimizer (did it really optimize anything?) to avoid index usage - eg, select column+0 or column||''. Perhaps they still work with CBO (unless it has grown so smart it knows when to ignore us). Received on Thu Oct 10 2002 - 12:48:31 CDT