RE: Just as a learning exercise

"1=1" -  I seem to remember the same thing (tho not hop-soaked) and eventually 
got phased out as being not helpful at all. 


Rui Amaral
Database Administrator
ITS - SSG
TD Bank Financial Group
220 Bay St., 11th Floor
Toronto, ON, CA, M5K1A2
(bb) (647) 204-9106
 

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Rich Jesse
Sent: Wednesday, May 04, 2011 9:44 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: Just as a learning exercise

Joe writes:

> to truncate the time component?

...which not only unnecessary in the comparison, but a performance drain. 
Also, although it defaults to midnight, I'd add the time component in the 
TO_DATE calls.

As far as the "1=1", when I started my current job, consultants used that in 
every statement.  A distant hop-soaked memory thinks it was a hack to attempt 
to remind the optimizer that the first table specified in the FROM was the 
driving table (or something like that?) in pre-9i days.

> From:
> Paul Drake <bdbafh@xxxxxxxxx>

...

> Why would anyone ever apply a TRUNC ( ) function to a date column in a 
> where clause?

Rich

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



NOTICE: Confidential message which may be privileged. Unauthorized 
use/disclosure prohibited. If received in error, please go to www.td.com/legal 
for instructions.
AVIS : Message confidentiel dont le contenu peut être privilégié. 
Utilisation/divulgation interdites sans permission. Si reçu par erreur, prière 
d'aller au www.td.com/francais/avis_juridique pour des instructions.
--
http://www.freelists.org/webpage/oracle-l


Other related posts: