Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL Tuning
Hi List,
Is anybody have any idea for better performance for the following query:
I just change the OR to UNION ALL
Appreciate any idea.
SELECT a.evh_event_id
FROM event_history_evh a WHERE (a.evh_event_id = 2 AND a.evh_created_date = (SELECT max( b.evh_created_date ) FROM event_history_evh b WHERE b.evh_session_id = 1785619526 AND b.evh_task_list_id = a.evh_task_list_id AND (sysdate - b.evh_created_date )*1440 < 5 AND b.evh_task_list_id != 469602)) OR-------UNIN ALL (a.evh_event_id = 2 AND a.evh_created_date = (SELECT max( c.evh_created_date ) FROM event_history_evh c WHERE c.evh_session_id != 1785619526 AND c.evh_task_list_id = a.evh_task_list_id AND (sysdate - c.evh_created_date)*1440 < 5 AND c.evh_task_list_id = 469602))
Hamid Alavi
Office : 818-737-0526
Cell phone : 818-416-5095
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Hamid Alavi
INET: hamid.alavi_at_quovadx.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Jan 24 2003 - 13:18:47 CST
![]() |
![]() |