Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Improving sluggish SQL
Message
De
21/12/1999 09:46:56
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00306158
Message ID:
00306650
Vues:
33
Bruce,

>Hard drive should be okay - the COPY TO is doing something like the SQL...NOT IN, apparently - something very slow that does full table access. Even though the "virtual" copy using BROW is quick to display, it may be only because a few records are displayed at a time, I suspect. Scrolling slowed down again..
>
>Also, it must be pulled into a table where I can manipulate the data - in fact, I don't need the BROW at all, this is all data processing work. I was just going to hide the BROW if the the idea worked. Maybe Edward's idea of SET OPTI OFF might help the COPY TO performance...

Can you check if it goes faster when copying the table without the relation and for clause to the disk ? Are you just trying to copy a very large table to the disk ?

If so, then the following:

If you don't have any deleted records in the related table you can also do something like this:

USE TABLE1
USE TABLE2 IN 0
COPY TO tempfile FOR !INDEXSEEK(Table1ForeignkeyExpr,.F.,"TABLE2",Table2Keyexpr)

This is the fastest way i could think of.

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform