Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to do when user SQL Selects too much?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01105674
Message ID:
01105787
Views:
24
You're correct in the first part of you statement. VFP9 help Optimized TOP N Performance says
"In Visual FoxPro 8.0 and earlier versions, when using the TOP N [PERCENT] clause all records are sorted and then the TOP N are extracted. In Visual FoxPro 9.0, performance has been improved by eliminating records that do not qualify for the TOP N from the sort process as early as possible".

However, I don't see how TOP N could slow a query down considerably.

>I thought about using TOP nnn but my understanding (and maybe I am wrong) of how VFP selects them is by preselecting ALL records meeting WHERE and then selecting the nnn of those. Therefore, I was concerned that TOP will slow down the SQL Select considerably. I know I should test it before making assumptions.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform