Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare two SQL Select
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01508173
Message ID:
01508211
Vues:
35
>Thank you. You experience and logic pretty much confirms for me that using the query without TOP and then simply GO TOP on the resulting query (created without TOP 1) will not adversely affect the time.

Are you using SQL Server or VFP? You can also try

select T.* from myTable T inner join (select top 1 PK from myTable ... ORDER ...) X ON T.PK = X.PK

This may perform better.

---------------------
Also, if we're talking SQL Server, then, of course, if you only need 1 record, you select just one records.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform