Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering character in a query
Message
De
01/03/2011 00:04:49
 
 
À
01/03/2011 00:00:11
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:
01502181
Vues:
34
>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.

That is a very interesting benchmark.

As for the fact that it should have returned the same result, I can't tell. Maybe there is setting locally that affects that. But, based on Naomi response, it seemed to be normal.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform