Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEXSEEK()
Message
From
12/11/2001 18:59:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00580322
Message ID:
00580672
Views:
13
It's needed because VFP has to check the data record to see if it matches the filter or is deleted. That's my point. I put the GO BOTTOM there simply to move the record pointer away from the record which has already been found in the previous loop.
It needs to be there to provide a fair comparison between the techniques.
It could easily have been GO TOP, or LOCATE or simply 10 (which would go immediately to record 10), so long as it's not record number 2 which happens to be the one im testing.

In my test data set there are only 11 records so it hardly matters.

INDEXSEEK is only faster if there is no filter and set deleted is OFF. That's the conclusion. And I'm guessing that many, if not most, developers run with SET DELETED ON.


>>The GO BOTTOM has to be there to validly compare the processes. It's the differences that important.
>
>David,
>Why do you think it is needed? SEEK and INDEXSEEK always work on the index. It starts at index node 1 and works its way from there. There is no performance boost if the record pointer starts on the same. VFP does not check the current record before accessing the index. VFP still has to search the index.
>
>>Think about it, if INDEXSEEK has to respect filter conditions, and the set deleted on, then the dataset has to be accessed and paged into memory to determine this. The filter info, including the delete mark, is not in the index.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform