Quote Originally Posted by slimdave
Your query will ful scan the uln_syn table and test the EXISTS condition for each row. Try this instead:
I had to add where rownum < 2 so that I only got back one row, but it works great. Thanks Dave!!!!!!!!

Code:
SELECT uln_syn.poe_ald_cal grp0, SUM ( uln_syn.sumoftotal_stons ) tot0
  FROM uln_syn
 WHERE tpfdd_runid_uln =
       ( SELECT ca_keys.comp_key
           FROM ca_keys
          WHERE ca_keys.comp_id = '0x080e0000010728e3ba1dc046fe878335'
            AND ROWNUM < 2 )
 GROUP BY uln_syn.poe_ald_cal;