• Lucky9 (6/13/2013)


    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...

    UNION ALL simply concatenates result sets so I doubt that is the cause of your poor performance. It will be impossible to provide a solution when you have not provided anything to work with, but I can suggest to tackle each select statement separately.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]