Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: WHERE 1 = 1 (any info on this)

RE: WHERE 1 = 1 (any info on this)

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 21 Oct 2003 05:09:26 -0800
Message-ID: <F001.005D3DC4.20031021050926@fatcity.com>


I agree with Connor that it has zero effect on the optimizer, and that it most likely was to make it easier to modify the view dynamically.

Either that or the author was some anal-nut-job that liked to see it for some bizarre reason.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Tuesday, October 21, 2003 8:05 AM
To: Multiple recipients of list ORACLE-L

I'm pretty sure the optimizer can pick up 1=1 anyway and ignore it as an always-true condition - so you get no benefit.

The most common cause I've seen for 1=1 is so when developers are building dynamic where-clause, they don't need to worry about adding 'where' versus 'and' to the sql string being constructed.

hth
connor


Connor McDonald
web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"



Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: hamcdc_at_yahoo.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 21 2003 - 08:09:26 CDT

Original text of this message

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