Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering character in a query
Message
From
01/03/2011 00:04:49
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01502169
Message ID:
01502181
Views:
33
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform