Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Severe performance problem with SQL
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
![]() |
![]() |