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

Home -> Community -> Usenet -> c.d.o.server -> Re: Why this query is sooo slow?!

Re: Why this query is sooo slow?!

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Thu, 20 May 2004 06:56:25 +0100
Message-ID: <40ac4879$0$20510$cc9e4d1f@news-text.dial.pipex.com>


"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.com
Received on Thu May 20 2004 - 00:56:25 CDT

Original text of this message

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