Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tune up this SP
Message
From
31/05/2002 17:28:30
 
 
To
31/05/2002 13:25:27
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00663553
Message ID:
00663688
Views:
11
I think you're falling victim to the way that SQL Server handles store procs.

What happens if you do something like this:
select TOP 500 * 
from dirmaster
where 
(name is null or name like RTRIM(@name))
and (tele_no is null or tele_no like RTRIM(@teleno))
. . .
If you are still have issues, you might want to create the proc with the WITH RECOMPILE option.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform