Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore Optimization
Message
 
 
À
22/09/2010 00:22:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01472464
Message ID:
01482288
Vues:
60
>(Naomi Said ) > In SQL Server Index can be used for ORDER BY.
>
>So, as I prepare my tables to be upsized to Sql Server, you're saying that I should plan on having an index in place for cases where I will use the Order By clause?
>
>I use Order By a lot, since all my child records have a field named 'Item' that I used in the Order By clause to get the child records in the correct order when they are displayed in the grid. The user can then rearrange them un the UI, and that's where the Item field comes in.
>
>You're saying and index will help that a little? The result set of child records is usually less than 10 records, so I've always assumed that ordering them by their 'Item' field was so easy/fast that there was no need to have an index in place.
>
>What do you think about this for my case?

I think you may find out by trial and error and examining the execution plan if the Index by Item will be beneficial for your case or not. It's not a very simple topic and simple decision - SQL Server optimizer decides which indexes to use depending on many factors. So, my recommendation is to try to simulate the exact production scenario, try with the index and without and compare execution plans for the difference.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform