Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improving sluggish SQL
Message
From
21/12/1999 09:46:56
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00306158
Message ID:
00306650
Views:
34
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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform