Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up search - Locate For or Seek?
Message
From
26/07/2000 15:37:31
 
 
To
26/07/2000 14:42:46
Erin Eby
Mission Critical Software
Gainesville, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00397065
Message ID:
00397263
Views:
30
>well had i realized that my small question would have caused such a controversy i would have thought twice. haha. seriously, i have learned quite a few tidbits from this thread. however, i am still having some problems with my search. i'm not sure if i'm just not grasping the concept or what. here's what i have:
>
>1. SELECT (table alias)
> LOCATE FOR ;
> (table field) = (variable)
>
>This one takes 10 seconds.
>
>2. SELECT (table alias)
> SEEK (variable)ORDER (table field)
>

This can't be right unless there's some sort of horrendous filter in place; SEEK should be virtually instantaneous assuming that an index exists on table field in the table table alias. The only thing I can imagine that'd take significant time would be if the first record matching the content of the variable was excluded by a SET FILTER, and VFP had to step forward from that record using the index until a record that passed the filter condition was encountered and either matched or failed, or if you're on a WAN and the time to Rushmore optimize the LOCATE expression by sucking down the CDX was equivalent to the time needed to suck in enough of the index tag toperform the seek, or if this is the result of a few thousand iterations of the operation, and the table fit completely in memory and was fairly small, so the initial cost of reading the file was small compared to subsequent identical services from cache.

>This one also takes 10 seconds.
>

Post the structure of the table, the indexes available, any filters active and the approximate size of the data sets.

>I didn't notice a change, so I figured I didn't have the syntax right or I was missing something. any clues?
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform