RE: Just as a learning exercise
Date: Wed, 4 May 2011 09:50:02 -0400
Message-ID: <1B861F1ABE40A84AA92AD585B20C558B270AD5491D_at_EX7T2-CV06.TDBFG.COM>
"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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Rich Jesse
Sent: Wednesday, May 04, 2011 9:44 AM
To: oracle-l_at_freelists.org
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_at_gmail.com>
...
> 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-lReceived on Wed May 04 2011 - 08:50:02 CDT