trying to fine tune a stored procedure
it has 10 union all between select scripts..performance is very slow...what is the alternate for union all..
and all the select statements have derived tables...so performance is very slow and sometimes we get the time out error also...
and in where clause we have left and max also...i think those are the 2 functions that are making the performance slow as well ...so what would be the alternate for left function..
i cannot paste any sql and explain plans...but if somebody can tell me the alternates for union all and left functions..that would be really great...