Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to improve the speed
Message
 
 
À
09/02/1999 13:49:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00185626
Message ID:
00185641
Vues:
17
Sylvain,

If the dupes are inside the SDF itself, I'd just APPEND the whole SDF and then run a SQL with a DISTINCT or GROUP BY to dedupe it.

If the dupes are between another table and the SDF I'd APPEND the whole SDF to a temp then do a SELECT * WHERE cPhone ! in ( select cPhone from AnotherTable ) then append the result to the table

>Running VFP 6 on a P133 64MB RAM Windows NT.
>
>I need to import 42 000 records from a SDF file into a table. I also need to eliminate all duplicated phone number for the current list. So, before importing each record, I issue a
>
>LOCATE FOR (iList = lnCurrentList) AND (cPhone = lnCurrentPhone)
>
>IF FOUND()
>   *-- Do not import
>ELSE
>   *-- Import
>ENDIF
>
>
>This work great. The only issue is that the LOCATE command take about 0.2 seconds on average. That may not seem very long, but for 42 000 records, that take more than 2 hours for the whole file.
>
>I'm using table buffering and have an index on iList, cPhone and Deleted().
>
>I tried using a SELECT-SQL instead, but SELECT-SQL will only use the records in the table, not the records in the buffer.
>
>BTW, Sys(3054, 1) on the SELECT-SQL with the same conditions as the LOCATE report full optimization.
>
>Has anybody have a suggestion on how to improve the speed of this validation?
>
>TIA
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform