Dear Marco Boschi:
On Wednesday, August 4, 2021 at 1:42:22 AM UTC-7, Marco Boschi wrote:
> In a LAN using DBFCDX If I Open a table of 68000 records
> (123 mb dbf 2 mb fpt and 11 mb cdx files) if I skip +1 or -1
> it's fast.
It is finding its position in the index, then moving up or down one record.
> If I SKIP +1000 and SKIP -1000 it takes 2 seconds. If I SKIP 9000 or
> SKIP -9000 it takes 20 seconds.
> How does the SKIP command works?
I'd think it is getting "confused" by the indexes you have open, and filters you have in effect. What happens if you "SET ORDER TO" and "SET FILTER TO" with no argument, so that it can just use the record pointer? So it is likely moving record-by-record, through the index, in current index order. Pumping the data off the server, to your computer to perform the logic, and repeating 1000 or 9000 times.
Here are some options: https://www.itlnet.net/programming/program/Reference/c53g01c/ngf31ef.html
dbgoto(recno()-1000) ... should be pretty fast.
David A. Smith