im assuming this is an old 'trick' from RBO days. Alot of these are still floating around. Wasnt there one when you wanted to force a full table scan you would go
where num_field = 1 + 0; the + 0 forced the full table scan? I was on a project earlier this year and one guy told people to use it. The myth about the ordered clause is out there too. Its 99% useless in the CBO. We had some poor .Net developers who knew basic sql. These poor guys were spending hours ordering 10-15 table joins.... I tried not to laugh. Wasnt successful. > > From: "Nuno Souto" <[EMAIL PROTECTED]> > Date: 2003/10/21 Tue AM 08:45:02 EDT > To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> > Subject: Re: WHERE 1 = 1 (any info on this) > > AFAIK, it has two origins: > > 1- To make editing text sql scripts easier, > in terms of alignment between the predicates. > > 2- As a trick to enhance the WHERE clause in > blocks in Forms, very old versions. > > Other than that never heard it made the slightest > difference to the CBO. > Cheers > Nuno Souto > [EMAIL PROTECTED] > ----- Original Message ----- > > > > "the 1=1 is in there to avoid doing repetitive index scans for single > > rowids, when the app "knows" the result set is going to be manipulated > > rowid's for a large subset of the table. I would guess your DUAL/CBO example > > had some similar effect." > > > > Is anyone familiar enough with this tweak to explain it ? > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: Nuno Souto > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).