Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why this query is sooo slow?!
"JZ" <ibm_97_at_yahoo.com> wrote in message
news:10bc841c.0405191029.28f4cb29_at_posting.google.com...
> Oracle 9.2.0.5 for Linux on a relatively powerful server (4GB RAM and
> 4 CPU)
> Of course as always, I didn't get any help at all from Oracle tech
> support.
>
> This is the query:
>
> select
<snip>
> where
> n.apptimestamp >= '05/02/2004 05:00:00'
> and n.apptimestamp < '05/02/2004 06:00:00'
<snip>
> And we have a composite index on HIGH
> (apptimestamp,nfseverity,deviceid,eventcount)
Which it can't use as you have written the query. try using the to_date function eg
where
n.apptimestamp >= to_date('05/02/2004 05:00:00','MM/DD/YYYY HH24:MI:SS')
and n.apptimestamp < to_date('05/02/2004 06:00:00','MM/DD/YYYY
HH24:MI:SS')
-- Niall Litchfield Oracle DBA http://www.niall.litchfield.dial.pipex.comReceived on Thu May 20 2004 - 00:56:25 CDT
![]() |
![]() |