Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Painfully Slow Monster Delete
Message
 
 
To
04/02/2010 10:58:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01447467
Message ID:
01447510
Views:
22
>>One more variation to try
>>
>>delete from myDataBase.OriginalClients OC 
>>where exists (select 1 from ToRemove where ToRemove.ClientID = OC.CLientID)
>
>Same result. Just thinking, is there any way to selectively turn of RI code? I don't really need to worry about that in this scenario because the archive routine loops recursively through all table relationships anyway.

Not with native RI, unfortunately. If you use any other RI generator (from Doug Hennig or from Walter Meester, for example), then it's easy to turn it off/on on demand.

One more possibility would be to have

EnableTriggers() and _ri_delete() in the triggers for each of the table. Then EnableTriggers() function would return t. or .f. depending on your conditions and everything would work as is. But it means you do need to manually adjust all your tables one time. I'm also not 100% certain RI Builder keeps the information we already have in the trigger and just adds itself at the end.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform