Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering character in a query
Message
De
01/03/2011 00:00:11
 
 
À
28/02/2011 22:23:42
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01502169
Message ID:
01502180
Vues:
43
Actually, unless I misunderstood your original question, both syntaxes should generate the same results

But on the optimization, you're right, mine only does an index scan, whereas the one Naomi gave ( LIKE 'S[_]SH%' ) does an index seek and is better. I have a test table with 27 million names, mine took 1.5 seconds, Naomi's took .4 seconds.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform