Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tune up this SP
Message
De
31/05/2002 17:28:30
 
 
À
31/05/2002 13:25:27
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00663553
Message ID:
00663688
Vues:
12
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform