Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The use of UPPER() in an index
Message
From
04/03/2008 03:00:12
Walter Meester
HoogkarspelNetherlands
 
 
To
04/03/2008 02:10:04
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01298350
Message ID:
01298363
Views:
28
>>By default, SQL Server’s use of indexes is case-insensitive
>>
>>You may also want to take a look at collating sequences.
>>http://www.sqlteam.com/article/using-indexed-computed-columns-to-improve-performance
>
>The only reason I added UPPER() expressions in VFP was to benefit of UPPER() searches and be optimized. In SQL Server, if I only have an index on Username for example, which was previously UPPER(Username) in VFP, will it still be optimized even when UPPER(Username) is used in a WHERE clause?

Yes and no. In SQL2000 (I cannot comment on SQL2005), using the UPPER() would force a index scan rather than an index seek. Though an index scan is faster than a table scan, it is significantly slower than an index seek. If possible, get rid of the UPPER()...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform