Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting slower!
Message
De
31/07/2001 18:42:11
 
 
À
31/07/2001 11:48:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00537775
Message ID:
00538083
Vues:
9
>....code after tables have been opened
>
>SELECT Table1
>SCAN
>REPLACE Field1 WITH FieldValue IN Table1
>    IF SEEK(Field2, "Table2", 2)
>          IF Table2.Field1 = .T.
>               INSERT INTO Table3 blah blah blah.....
>          ENDIF
>    ENDIF
>ENDSCAN
>
>There you go, basically what it is doing.
>
>Kev

Some other tweaks I'd suggest:

1) Set Talk and Notify Off

2) Switch the SEEK and the Field1=.T. and make them one line.
e.g.
IF Table2.Field1 = .T. And SEEK(Field2, "Table2", 2)
The Table2.Field1 will be evaluated first and won't even go to the SEEK if it's .F..

3) If you can (you may not be able to if it's multi-user), Set Exclusive On first.

4) You might could recode it to a bulk APPEND FROM, which should be faster than a SCAN REPLACE INSERT.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform