Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting slower!
Message
From
31/07/2001 18:14:59
 
 
To
31/07/2001 11:48:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00537775
Message ID:
00538076
Views:
14
>....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-
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform