Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_DBSkip() vs. SKIP
Message
From
02/12/1999 16:11:34
 
 
To
01/12/1999 20:28:19
Juan Kh
Dataprop Technologies
Sungai Petani, Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00297701
Message ID:
00298169
Views:
18
>Hi all,
>
>I am working on a table that has a maximum records of 10,000. However, I need to SKIP through every records and every fields in this table to perform some calculation. The program is kind of like "solver" type (solving for at least 60,000 variables), looking for the best value. The number of iterations is extremely high. Would it be better to write a C fll to perform this? My worry is that calling back to VFP (_DBSkip()) would yield the same speed, eventhough I can expect speed increase in other calculations.
>
>It would be great if someone could propose a better idea.
>
>Regards,
>juan

Juan,

Where is the result of your calculation going ??? I would probably use a set based solution instead of skipping around in the table.

As an example,

************************************************************************

Set Procedure To MyProcedureFile

Select ;
MyRow_ID, ;
MyCalculation1(MyCol1, MyCol2, MyCol3) As Result1, ;
MyCalculation2(MyCol2, MyCol6) As Result2 ;
From MyTable ;
Into Table MyResultTable

************************************************************************

You could also replace the procedure file with a VFP DLL and declare the functions ahead of time. I have used similar methodology over and over again on tables with 250,000 + records and many complex calculations with very acceptable results. It's not the only way, but I'm always in favor of reducing the amount of code required.

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Previous
Reply
Map
View

Click here to load this message in the networking platform