title: Oracle (TOAD) Query Progress
body: <p>Is there a way using Toad to either check or estimate the progress of a query? I have a query which is at it's best running for around 20 minutes. As i'm tweaking the query to try and make it faster sometimes it ends up in a total loop and will never finish. Sometimes it might take an hour. What would be really useful is some indication of just how much ground the query is actually covering to at least give me an idea what is going quicker or what is making it go slower.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>I've included my query just incase someone might see something glaringly obvious that might increase the efficiency...</p>
  
  <pre><code>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   wm_archive.prod_trkg_tran@awm.corp.*******.com aptt
  inner join user_master um 
  on um.emplye_id = aptt.user_id
  left outer join wm_archive.carton_hdr@awm.corp.*******.com ach  
  on ach.carton_nbr = aptt.cntr_nbr
  where aptt.cntr_nbr not in
  (select aptt.cntr_nbr from wm_archive.prod_trkg_tran@awm.corp.*******.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 wm_archive.prod_trkg_tran@awm.corp.*******.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 &lt;=2;
  </code></pre>
  
  <p>7's</p>