Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting slower!
Message
De
31/07/2001 18:14:59
 
 
À
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:
00538076
Vues:
13
>....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


INSERT is definitely the problem because you insert a record at the current record pointer position with each call. That means you rewrite the entire table from the top down each time and as the number of records in the table increases, the amount of time to rewrite the table increases. Use APPEND instead as this will add each new record to the end of the table and save lots and lots of disk I/O.
-Henry-
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform