Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL indexes
Message
De
08/08/2001 10:43:29
 
 
À
08/08/2001 10:05:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00541265
Message ID:
00541288
Vues:
26
>I have created some stored procedures in SQL and they contain indexes. As you know SQL indexes speed up the query. The problem is, at times I want to wrap the field(s) being selected in RTRIM or LTRIM. The proble is this sows down the query, because it does not use the INDEX.
>
> have any of you guys 'Who use SQL server' run into this problem, and if so how did you handle it?
>
> I resorted to useing padding of spaces on the variable passed to SQL. Are there any other solutions?

You can use table or query hints to persuade SQL Server to use a particular index or order. Look up OPTION and INDEX() in the BOL.

Also, take a look at this white paper at MS: http://www.microsoft.com/SQL/techinfo/administration/70/perftuning.asp
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform