Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LOCATE x GO TOP
Message
 
To
03/11/2005 10:58:21
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01064195
Message ID:
01065058
Views:
37
>Hey Terry
>
>>Locate and filters set with gotop are slow. SEEK is fast. I usually loop through the scope after a seek. But you might be able to seek first and then scope it with set filter.
>
>Bear in mind you may have a filter that is not part of the current SET ORDER.

I understand. My suggestion was not to set a filter until a seek had located the key. Once that is accomplished, the order can be changed and a filter set. The record pointer will not change. And then it would only be a manner of scanning, or scoping to the end of the filter.

For simple apps or debugs, set filter is a great tool. VFP makes it so easy to groom the data with FILTERS snd SELECTS into temporary cursors, that we sometimes forget that the best performance results from xBase SEEKs and iteration. Try an experiment. Take a little project that uses FILTERS and/or SELECT into cursors. Refine the the keys (use multiple key fields - remember there is a SET EXACT off that will point to a partial key) and cover those pieces of the project that SELECT or FILTER with additional indexes in the CDX.

If you can successfully remove all FILTER and all SELECTs (into cursor) and replace them with SEEKS and iterative methods (SCAN / DO WHILE), you will see the true power of VFP. There is nor performance camparison fot VFP apps that avoid FILTER and SELECT into. Its raw speed. If a project doesn't do that, than it may as well be done in VB or ACCESS.

Have you noticed the HELP INDEX finder. As you press keyboard character, the pointer is moved. As you back space it moves. You can only do that with SEEK (as far as I know). It would be impossible, if not embarrisingly slow to attempt such an interface with filters or selects. That, my friend, is what xBase is all about - building Ferraris - not Chevy YUKONS:-)
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform