Re: Just as a learning exercise

From: Rich Jesse <rjoralist2_at_society.servebeer.com>
Date: Wed, 4 May 2011 08:43:34 -0500 (CDT)
Message-ID: <4ae3572ec7e93fa49dd86d954c5b996f.squirrel_at_society.servebeer.com>



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
Received on Wed May 04 2011 - 08:43:34 CDT

Original text of this message