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 -> Severe performance problem with SQL

Severe performance problem with SQL

From: <raorg_at_my-deja.com>
Date: Thu, 05 Aug 1999 21:52:32 GMT
Message-ID: <7od12s$nt$1@nnrp1.deja.com>


Hi,
I have a view based on an SQL which is selecting stuff from a five tables. A part of the where clause is that the stoptime must be within the last two months or null.

The where clause includes the following statement:
... AND

    (table1.STOPTIME is null OR table1.STOPTIME < sysdate)...

This takes about 20 secs to run.

If I change the above to:
... AND

    (table1.STOPTIME is null OR table1.STOPTIME > sysdate-60)...

the statement takes 880 seconds to run.

Can anyone help me find something equivalent to the above without the severe performance problem. Or modify the above...

Help will be much appreciated.
Thanks,
Rajesh.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Aug 05 1999 - 16:52:32 CDT

Original text of this message

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