WOW

By Phil Bartow

Nov 1998

I remember when Fox first came out. It had the filter on the index. We were teaching dBase II and when we compared the two we would say WOW. Each upgrade of Fox carried with it a few WOW, that's neat features. Now there seem to be a lot of OW features but still a few WOWs. Having beat my head against the wall for the past few years I find that a lot of basic programming activities in old FoxPlus still work the best. Structural indexes get in my way more than note. Environment setting really gets in the way of moving data around. I might be an inefficient coder but ...I can tune the screen and keyboard to the users needs.

Somebody was writing in FoxPro Advisor or VFUG Newsletter recently about the time it takes to access data using different methods. They had a million record database and were searching for 4 records that matched a condition. The tone of the article was that times of a few minutes was great. If a user is working with data in a real-time environment wait time of more than ten seconds is unbearable. Using VFP6, I generated a simple table with a million records and assigned a field random values from1 to 5000 and indexed on that field. Four records where given a specific value to search for. On a 200 MHz Pentium pro locating (LOCATE) and writing 4 records (that were at the end of the index) took 79.78 long seconds (the same search on a 450Mhz system it took 1.2 seconds... faster machines are nice). Using Seek to find the first occurrence, setting a pointer and counting down through the table until the field no longer contained the correct value, returning to the pointer and COPY NEXT n to a temporary file and displaying the file took .010 seconds on the slower machine and .000 seconds on the faster machine! If the number of records found is 2000 or so then the find and copy time increases as the copy time increases to 6.98 seconds (slow machine) and .68 seconds on the faster machine.

Going from 79.78 seconds to .000 seconds is a real WOW.

 

Phil Bartow
Bartow Associates, Inc
bartow@bartowassoc.com