select b.userlabel,
b.zh_label,
a.ftp0,
a.ftp1,
a.ftp2,
a.ftp3,
b.int_id,
b.object_class,
a.resource_status,
a.org_severity,
a.org_type,
d.remark_txt,
a.event_time,
a.probable_cause,
b.province_id,
b.province_id || ':' || b.city_id as region,
b.region_id,
b.vendor_id,
a.redefine_severity,
a.redefine_type,
a.active_status,
a.ack_flag,
a.alarm_title,
a.cancel_time,
a.ack_time,
a.ack_user,
a.omc_id,
a.cancel_terminal,
a.cancel_user,
a.ack_terminal,
a.locate_info,
a.probable_cause_txt,
a.vendor_severity,
a.vendor_type,
c.special_field0,
c.special_field1,
c.special_field2,
c.special_field3,
c.special_field4,
c.special_field5,
c.special_field6,
c.special_field7,
c.special_field8,
c.special_field9,
c.special_field10,
c.special_field11,
c.special_field12,
c.special_field13,
c.special_field14,
c.special_field15,
c.special_field16,
c.special_field17,
c.special_field18,
c.special_field19,
c.special_field20,
a.time_stamp,
c.alarm_text0,
c.alarm_text1,
c.alarm_text2,
c.alarm_text3,
c.alarm_text4,
c.alarm_text5,
c.alarm_text6,
c.alarm_text7,
c.alarm_text8,
c.alarm_text9,
c.alarm_text10,
c.alarm_text11,
c.alarm_text12,
c.alarm_text13,
c.alarm_text14,
c.alarm_text15
from a, b, c, d
where (a.event_time BETWEEN
TO_DATE('2009-03-03 10:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_DATE('2009-03-03 12:00:00', 'YYYY-MM-DD HH24:MI:SS')) AND
a.int_id = b.int_id AND
a.object_class = b.object_class AND
a.ftp0 = d.ftp0(+) AND
a.ftp1 = d.ftp1(+) AND
a.ftp2 = d.ftp2(+) AND
a.ftp3 = d.ftp3(+) AND
a.ftp0 = c.ftp0(+) AND
a.ftp1 = c.ftp1(+) AND
a.ftp2 = c.ftp2(+) AND
a.ftp3 = c.ftp3(+) AND
(a.resource_status in (1))
这个SQL语句怎么优化,大家谁有好的的办法?谢谢了,希望大家帮帮忙~~~~
b.zh_label,
a.ftp0,
a.ftp1,
a.ftp2,
a.ftp3,
b.int_id,
b.object_class,
a.resource_status,
a.org_severity,
a.org_type,
d.remark_txt,
a.event_time,
a.probable_cause,
b.province_id,
b.province_id || ':' || b.city_id as region,
b.region_id,
b.vendor_id,
a.redefine_severity,
a.redefine_type,
a.active_status,
a.ack_flag,
a.alarm_title,
a.cancel_time,
a.ack_time,
a.ack_user,
a.omc_id,
a.cancel_terminal,
a.cancel_user,
a.ack_terminal,
a.locate_info,
a.probable_cause_txt,
a.vendor_severity,
a.vendor_type,
c.special_field0,
c.special_field1,
c.special_field2,
c.special_field3,
c.special_field4,
c.special_field5,
c.special_field6,
c.special_field7,
c.special_field8,
c.special_field9,
c.special_field10,
c.special_field11,
c.special_field12,
c.special_field13,
c.special_field14,
c.special_field15,
c.special_field16,
c.special_field17,
c.special_field18,
c.special_field19,
c.special_field20,
a.time_stamp,
c.alarm_text0,
c.alarm_text1,
c.alarm_text2,
c.alarm_text3,
c.alarm_text4,
c.alarm_text5,
c.alarm_text6,
c.alarm_text7,
c.alarm_text8,
c.alarm_text9,
c.alarm_text10,
c.alarm_text11,
c.alarm_text12,
c.alarm_text13,
c.alarm_text14,
c.alarm_text15
from a, b, c, d
where (a.event_time BETWEEN
TO_DATE('2009-03-03 10:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_DATE('2009-03-03 12:00:00', 'YYYY-MM-DD HH24:MI:SS')) AND
a.int_id = b.int_id AND
a.object_class = b.object_class AND
a.ftp0 = d.ftp0(+) AND
a.ftp1 = d.ftp1(+) AND
a.ftp2 = d.ftp2(+) AND
a.ftp3 = d.ftp3(+) AND
a.ftp0 = c.ftp0(+) AND
a.ftp1 = c.ftp1(+) AND
a.ftp2 = c.ftp2(+) AND
a.ftp3 = c.ftp3(+) AND
(a.resource_status in (1))
这个SQL语句怎么优化,大家谁有好的的办法?谢谢了,希望大家帮帮忙~~~~
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/751371/viewspace-563133/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/751371/viewspace-563133/