Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sysdate

Re: sysdate

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: 1999/03/31
Message-ID: <3702F71B.6B3C@oriolecorp.com>#1/1

Arjan van Bentem wrote:
>
> Marc Mazerolle wrote
> > where mytable.start_date between sysdate and sysdate + 7
>
> Ehhh, why search for a start date from now, until 7x24 hours from now?
>
> where trunc(activitydate) = trunc(sysdate)
>
> Arjan.

I would follow Marc's advice for one reason : if activitydate is indexed,
the otherwise perfectly valid trunc(activitydate) will prevent (unless you are running Oracle 8.1 and have indexed trunc(activitydate)) using the index.

-- 
Regards,

  Stéphane Faroult
  Oriole Corporation
------------------------------------------------------------------
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
------------------------------------------------------------------
Received on Wed Mar 31 1999 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US