Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed up processing for SQL pass thru
Message
De
21/09/2004 09:24:57
 
 
À
20/09/2004 19:22:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00944038
Message ID:
00944516
Vues:
19
>Beth,
>I suggest you to reread OpenRowSet() sample. If you don't change anything but do a delete/add then your command turns out to be:
>
>delete from myTable where pkid in (select pkid from openrowset(...))
>insert into myTable (select < fieldlist > from openrowset(...))
>
>or:
>select * from openrowset(...) into table #temp
>delete from myTable where pkid in (select pkid from #temp where action in ('change','delete'))
>insert into myTable (select < fieldlist > from #temp where action in ('change','add'))
>
>Also search for "bulk/copy" here on UT and bcp/bulk insert in SQL server books online.
>
>Constraints and existing indexes might be a factor in slowdown. Bulk copy operations have hints (ie:default constraint checking is off). If you're doing insert/update/delete that'd affect multiple tables then consider doing them in a order that even if you turnoff constraints checking you'd not be beating integrity/concurrency.
>
>You might try with VFP remote views or updatable SPT cursors too if you can define a set to work on - you might well use openrowset() for that (table buffered if you try).
>Cetin
Hi, Cetin
I do not use openrowset - mainly because I can not figure out if vfpoledb is on the computer I am using. Also, please see my reply to John Ryan on this thread.
Thanks,
Beth
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform