Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow SQL data extraction
Message
De
26/07/2001 05:30:44
Denis Filer
University of Oxford
Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Slow SQL data extraction
Divers
Thread ID:
00535574
Message ID:
00535574
Vues:
45
I have a problem with slow data extraction using SQL. I want to extract records from 'file2' that have codes that match those in 'file1'.

* open a file to extract data from.
use file2 in 0 alias file2

* this is where the data will go.
cMyextract = "extract.dbf"

* create an array of key codes from another file (file1) - store in an array
select distinct keycode from file1 into array myfilecodes

if _tally <> 0
select * from file2 into DBF &cMyextract where ascan(myfilecodes,keycode) > 0
use
endif

I am no expert with SQL. Setting an index on the files doesnt seem to help.
Especially slow on networks. THANKS!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform