Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reposition record pointer in a BizObj
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00362006
Message ID:
00363119
Vues:
17
Cathi,

>You used the SEEK function here. I am using remote views for all data access with the back end being SQL Server. Would I be better off using the SEEK or the LOCATE function? These tables could get quite large in the future. I will almost always SEEK/LOCATE on the primary id. To use the SEEK function I assume I would need to create a temporary index when the view is created. I would think this could take a long time.>

As I'm sure you know, your goal for optimization purposes is to return as few records as possible from the SQL Server database. You can do this by using a parameterized remote view or using SQL pass-through.

If you are certain that you have returned a small number of records it may be faster to use LOCATE rather than build a temporary index then issuing a SEEK...even though LOCATE needs an index to be Rushmore-optimizable. If you use LOCATE without an index, you'll get better performance if you include the NOOPTIMIZE clause which turns off Rushmore optimization.

However, if you have returned a large number of records it would probably be faster to build the index before SEEKing, especially if you are doing multiple SEEKs on the returned set of records.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform