Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Benchmark Study: Never use append from
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00022270
Message ID:
00022366
Vues:
43
>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform