Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare two SQL Select
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01508173
Message ID:
01508213
Views:
25
>>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.

At this point I am only looking at VFP but in the future either VFP or SQL Server. Thank you for your suggestions.
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform