Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$ equivalent in SQL Server?
Message
From
25/01/2002 08:58:27
 
 
To
25/01/2002 04:33:27
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00610309
Message ID:
00610411
Views:
19
Becareful here. SQL Server will not be able to optimize this query with an index and will resort to a table scan. In general, SQL Server can only optimize those clauses that are in the form

column = literal

LIKE is another one that can bite you. SQL Server can optimize this:

column LIKE 'b%'

because it will convert it to

column >= 'b' AND column < 'c'

but it can't optimize

column LIKE '%b'

Now, sometimes you have no choice. If it the only way to get the job done, then you do it that way.

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

Click here to load this message in the networking platform