Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Benchmark Study: Never use append from
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00022270
Message ID:
00022366
Views:
47
>>>Discovered something that folks might find useful.
>>>
>>>If you need to append records from one table to another based on a condition you would think (as did I ) of using the command
>>>
>>>Append from (sourcetable) for mycondition
>>>
>>>WRONG.
>>>
>>>Instead do the following
>>>
>>>Use sourcetable
>>>scan for mycondition
>>> insert into destinationtable (fields) values (sourcetable.fields)
>>>endscan
>>>
>>>Apparently append from doesn't use rushmore and the benchmark difference between the two, even on medium tables (source 10,000 records, dest 1,000 records) was staggaring.
>>>
>>>HTH
>>
>>VFP help contains list of Rushmore Optimizable Commands ("Potentially Optimizable Commands with FOR Clause"). It includes SCAN and misses "APPEND".
>
>But THAT involves 'RTFM' and we all know programmers NEVER do that ;-)
>
Besides, just because it's not optimizable doesn't mean you should never use it. Why, my Append From/For worked just fine on smallish tables, I just bumped into a 'slight delay' (s) trying to process a huge table...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform