Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The use of UPPER() in an index
Message
De
04/03/2008 03:00:12
Walter Meester
HoogkarspelPays-Bas
 
 
À
04/03/2008 02:10:04
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01298350
Message ID:
01298363
Vues:
30
>>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()...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform