Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed-east.nntpserver.com!nntpserver.com!feed.cgocable.net!news.stealth.net!news.stealth.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr14.news.prodigy.com.POSTED!34d3422d!not-for-mail
From: Karsten Farell <kfarrell@medimpact.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.server
Subject: Re: 1=1
References: <91884734.0210091256.32c7fe4b@posting.google.com> <TQ1p9.1814$u87.135229595@newssvr21.news.prodigy.com> <91884734.0210100915.3b64eb81@posting.google.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 19
Message-ID: <P3jp9.2851$Ev1.166997253@newssvr14.news.prodigy.com>
NNTP-Posting-Host: 67.117.210.172
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr14.news.prodigy.com 1034272111 ST000 67.117.210.172 (Thu, 10 Oct 2002 13:48:31 EDT)
NNTP-Posting-Date: Thu, 10 Oct 2002 13:48:31 EDT
Organization: Prodigy Internet http://www.prodigy.com
X-UserInfo1: [[PAPDCAO@U_RITXYRHNO_TDFZ\@@FXLM@TDOCQDJ@_@FN@ANVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN
Date: Thu, 10 Oct 2002 17:48:31 GMT
Xref: newsfeed1.easynews.com comp.databases.oracle.server:163757
X-Received-Date: Thu, 10 Oct 2002 10:48:59 MST (news.easynews.com)

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).

