how to improve performance of the query with unions

  • I don't know how many records are involved, but NOT EXISTS might offer some advantages.

    FROM V_RPT_TRANS2 WHERE INTNL_PF_NUM NOT IN (SELECT INTNL_PF_NUM FROM V_RPT_TRANS1)

    Gail is right - looking at the plan would be your best way to troubleshoot. And you probably might have a look at why duplicate records seem to be creeping in.

    It also looks kind of like a data dump. Reveiwing the requirements to see if  some columns / rows could be eliminated also might be a good idea.

    GE

     

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply