I seem to have narrowed down the performance problem somewhat.
Seems to be tied to a "like" clause, e.g.
...
AND e.myCol LIKE CASE @myParam
WHEN '<All>' THEN '%'
ELSE @myParam END
If I specify NULL for @myParam, the query runs in 15 seconds. If I specifiy a value for @myParam, the query slows to a grinding halt, ie) never returns.
I remember reading on this board a while back that using "LIKE" is not good for performance.
Can someone please enlighten me on this again...
Thanks!
Seems to be tied to a "like" clause, e.g.
...
AND e.myCol LIKE CASE @myParam
WHEN '<All>' THEN '%'
ELSE @myParam END
If I specify NULL for @myParam, the query runs in 15 seconds. If I specifiy a value for @myParam, the query slows to a grinding halt, ie) never returns.
I remember reading on this board a while back that using "LIKE" is not good for performance.
Can someone please enlighten me on this again...
Thanks!