Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Significance of index names?
Message
 
 
À
10/06/2011 02:41:14
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01513532
Message ID:
01513993
Vues:
38
>>>Dmitry,
>>>>
>>>>In VFP index tags have certain significance as they are used in SEEK() function. When creating index tags in SQL Server does it really matter the names of the index tags? If yes, what is it, then I will follow a certain convention.
>>>
>>>Not really, though, in SQL server you can within SQL select statement add a hint to which indexes to use.
>>
>>Walter,
>>How do you indicate (or hint) in the SQL Select what index tag to use? I didn't know you can do it.
>>Thank you.
>
>SELECT * FROM Table WITH (INDEX(IndexName)) WHERE ...
>
>See 'Table hints' on the SQL server Books online.
>
>Note that is is not recommended as you overrule the SQL servers optimizer to determine the best query optimization plan. In some very specific cases it might be helpfull to specify, but in general you just want to make sure you've got the right indexes and let SQL server itself determine the best way to optimize the query.

Thank you. Very useful to know.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform