• Bhuvnesh (1/17/2013)


    Place your (

    SELECT a, b FROM KEY_TABLE kt JOIN......

    UNION

    SELECT a, b FROM KEY_TABLE kt JOIN......

    UNION

    SELECT a, b FROM KEY_TABLE kt JOIN......

    ) T0

    code in temp table and add appropraite indexes (acc to outer query ) to it

    then use that temp table in main query

    PLUS

    POST exec plan here (as OPC suggested above)

    Thank you for sharing.

    I hope i can change the code but I could not. it's auto generated code based on criterion set to application. What i can do so far is explained the current situation to the application owner.

    V