Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow multi-user response
Message
De
15/07/1997 10:14:39
 
 
À
14/07/1997 14:12:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00039866
Message ID:
00039978
Vues:
35
>User A adds a new record to a shared table
>
>User B, on a different machine, (or in our test case in another copy of Visual FoxPro running on the same machine) is watching the same table looking for a record with specific content. Fortunately we have an appropriate index. Unfortunately, it is taking from 2 to 5 seconds for user B to find the new record from the time that user A does his replace. What's going on?
>
>User B's code looks something like this
>
> use Food shared in 0
> set order to Vegetable
> do while .t.
> if seek("Turnip")
> ? "We found it at ", seconds()
> exit
> endif
> enddo
>
>User A tried to speed things up by puting a FLUSH command after the REPLACE, but it didn't help.
>
>Things did speed up though to almost instantaneous response when user B changed his code to:
>
> use Food shared in 0
> set order 0 && We won't bother with the index
>
> do while .t.
> go top
> do while !(Food.Vegetable == "Turnip") and !eof()
> skip
> enddo
>
> if Food.Vegetable == "Turnip"
> ? "We found it at ", seconds()
> exit
> endif
> enddo
>
>
>This brute force method that could end up doing hundreds (or thousands) of skips beats the seek approach hands down. Its as if the table update is seen immediately by both processes, but the index update comes 2 to 5 seconds later. Sure, this is a complicated index, ... but 2 to 5 seconds?
>
>Bob


How about disk caching? Fox does some itself. How about your server? We've had BIG problems with the write cache on our RAID 5 disk arrays and turned it off. Have yet to experience read cache problems, but we're not trying to do what you are doing.

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform