Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The use of UPPER() in an index
Message
De
04/03/2008 12:52:03
Walter Meester
HoogkarspelPays-Bas
 
 
À
04/03/2008 12:13:31
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01298350
Message ID:
01298503
Vues:
22
>>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()...
>
>Well, I need to have a way to continue to support the UPPER() syntax inside a SQL for places where this is required. Because, sometimes, the SQL is done case insensitive, which I will use it. But, when I need to search as is, I will avoid using UPPER().

So you've setup SQL server to be case insenstive? In that case you'll have to accept a index scan for that field. Whether that is going to affect performance beyond acceptable is something you need to test.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform