Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locate
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Locate
Miscellaneous
Thread ID:
00091875
Message ID:
00091920
Views:
17
>If I have a table that has 500,000 records in it and I locate for number 400,000. Is there a way to locate for 400,500 without having to have VFP look at the first 400,000 records. continue() I know is used iuf you are searching for the same parameter, but I want to change the search parameter and continue where the last search finished. Also seek will not work because I want to search for multiple condition. Any suggestions?


I tried this test program on a table with about 400000 records:
CLEAR
t1 = SECONDS()
SET INDEX TO
LOCATE FOR refdes = 'ZZZZZZZZZZ' AND NAME = 'ZZZZZZZZZZ'
t2 = SECONDS()
time1 = t2-t1
currrec = RECNO()
SCATTER MEMVAR
SET FILTER TO RECNO()>currrec
SET ORDER TO TAG test
SEEK M.sru_part+M.fsn
SET FILTER TO
t3 = SECONDS()
time2 = t3-t2
?time1
?time2
?currrec
tottime = t3-t1
?tottime
?RECNO()
The results were: find first record(rec# 194032) 1.603 sec
set the index and seek the second record(different criteria) (rec# 388064) 0.000 sec too fast to measure. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform