RE: Just as a learning exercise

  • From: "Amaral, Rui" <Rui.Amaral@xxxxxxxxxxxxxxxx>
  • To: "'rjoralist2@xxxxxxxxxxxxxxxxxxxxx'" <rjoralist2@xxxxxxxxxxxxxxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 4 May 2011 09:50:02 -0400

"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
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?



NOTICE: Confidential message which may be privileged. Unauthorized 
use/disclosure prohibited. If received in error, please go to 
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 pour des instructions.

Other related posts: