Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local or Remote View Too Slow... What else should I do?
Message
From
16/05/2002 08:27:25
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
15/05/2002 23:56:12
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00656787
Message ID:
00657334
Views:
20
Dennis

The SEEK command is by far the fastest search technique available to VFP. Don't use ODBC or views. Just use the tables directly if speed is a big concern.

Do you have a field indicating the date the record was added? That would allow you to determine the earliest not yet taken record.

If the field is called date_added have an index like this...

INDEX ON IIF(TAKEN,"Y","N")+dtos(date_added) TAG NOT_TAKEN descending

Then to find the earliest not taken record...

?SEEK("N",,"NOT_TAKEN")

HTH

>Dear Cetin,
>
>I am using VFP tables at the back end. (My client does not have an allocated budget to acquire SQL SERVER.) My remote views access via ODBC the VFP tables. Will SQL Server yield out results much faster than accessing ODBC VFP tables?
>
>I will try out LOCATE as per your suggestion. Would a LOOP like SCAN...ENDSCAN or DO WHILE.. ENDDO (with SKIP of course) execute faster than a LOCATE?
>
>What it should do is basically have a table of around lets say 100,000 records (located at the server) and have 100 stations access it. The system or application should give out distribute the next 'available' record to whoever is 'free'. For example, when a user requests for a record, it should locate the very first available record and tag the record 'taken'. So when another user requests, it will give next the next available record, tag it as taken and so on...
>
>Sincerely,
>
>Dennis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform