Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up search - Locate For or Seek?
Message
From
26/07/2000 12:13:49
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
To
26/07/2000 11:19:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00397065
Message ID:
00397113
Views:
17
>Geo,
>
>>LOCATE is a sequential search of the table. SEEK utilizes indexes which are binary trees ordering the table.
>
>I'm not debating that SEEK is faster -- but how can LOCATE always be a sequential search of the TABLE, even when Rushmore kicks in?

When I use a LOCATE command the speed of the command is unaffected by the presence(or lack thereof) of indexes. Thus, I suspect LOCATE does not use RUSHMORE.
I believe LOCATE performs a sequential search because when I LOCATE for a record that is the 50th record in a table of one million records the search time is very short ( less than 1/10 of a second). However, when I perform a LOCATE so that it finds record 999,999 the search takes over one minute.
SEEK search times are always the same regardless of where the correct record is inside the table.

Hope this helps
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform