有沒有使用Toad檢查或估計查詢進度的方法?我有一個查詢,最好運行20分鐘左右。當我調整查詢來嘗試使其更快時,它有時會以循環結束,並且永遠不會結束。有時可能需要一個小時。真正有用的是一些跡象表明查詢實際覆蓋了多少基礎,至少讓我知道什麼更快或什麼使它變慢。Oracle(TOAD)查詢進度
任何幫助將不勝感激。
我包括我的查詢只是櫃面有人可能會看到一些昭然若揭可能提高效率......
select * from
(select menu_optn_name, tran_nbr, seq_nbr, cntr_nbr, ch.total_qty, ptt.create_date_time,
um.user_name, ch.trlr_nbr, sum(ref_field_2) as Total from prod_trkg_tran ptt
inner join user_master um
on um.emplye_id = ptt.user_id
left outer join carton_hdr ch
on ch.carton_nbr = ptt.cntr_nbr
where (menu_optn_name = 'RF Split/Comb {Carton}' and ptt.cntr_nbr = '0030651942')
group by menu_optn_name, tran_nbr, seq_nbr, cntr_nbr, ch.total_qty, ptt.create_date_time,
um.user_name, ch.trlr_nbr
union
select aptt.menu_optn_name, aptt.tran_nbr, aptt.seq_nbr, aptt.cntr_nbr, ach.total_qty,
aptt.create_date_time, um.user_name, ach.trlr_nbr, sum(aptt.ref_field_2)
as Total from [email protected]*******.com aptt
inner join user_master um
on um.emplye_id = aptt.user_id
left outer join [email protected]*******.com ach
on ach.carton_nbr = aptt.cntr_nbr
where aptt.cntr_nbr not in
(select aptt.cntr_nbr from [email protected]*******.com aptt
where aptt.menu_optn_name = 'RF Split/Comb {Carton}' and aptt.cntr_nbr = '0030651942')
and aptt.tran_nbr in
(select aptt.tran_nbr from [email protected]*******.com aptt
where aptt.menu_optn_name = 'RF Split/Comb {Carton}' and aptt.cntr_nbr = '0030651942')
group by aptt.menu_optn_name, aptt.tran_nbr, aptt.seq_nbr, aptt.cntr_nbr, ach.total_qty,
aptt.create_date_time, um.user_name, ach.trlr_nbr)
where rownum <=2;
7的
只需嘗試蟾蜍中的會話瀏覽器(您需要特權並從DBA中獲取一個)。你會得到更多的信息。但閱讀更多關於他們使用文檔 – SriniV