Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Which Date comparison more efficient?
Bench mark it. How about
adate>= to_date('10-10-03','MM-DD-YY')
and adate< to_date('10-11-03','MM-DD-YY')
That would be a LOT more efficient than the other two assuming there is an
index on adate.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Skinny Guy" <skinnychineseguy_at_hotmail.com> wrote in message news:f9b5a61d.0305061451.4cc8051b_at_posting.google.com...Received on Tue May 06 2003 - 21:16:09 CDT
> 1) trunc(aDate) = to_date('10-10-03','MM-DD-YY')
>
> or
>
> 2) to_char(aDate,'MM-DD-YY') = to_date('10-10-03','MM-DD-YY')
![]() |
![]() |