Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Painfully Slow Monster Delete
Message
 
 
À
04/02/2010 10:15:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01447467
Message ID:
01447479
Vues:
22
>>>>I'm not 100% now sure the second method will work. Does the delete trigger fire when you mark record for deletion (I assume it does). If so and you have RI defined (with CASCADE delete), you may not use the second method either :(
>>>
>>>Yup, we're back to the drawing boards. There is RI with CASCADE delete; great bunches of child tables. I started it about five minutes ago and it's still chugging....
>>
>>Ok, do the normal delete then
>>
>>delete OC from OriginalClients OC inner join ToRemove TC on OC.ClientID = TC.ClientID
>>
>>assuming we have index on ClientID in both OriginalClients and ToRemove the performance should not be too bad even with all the delete triggers firing in the background.
>
>That syntax isn't supported in VFP7, however it should be about the same as
>
>DELETE FROM MyDataBase!OriginalClients ;
>	WHERE NOT DELETED() ; && Rushmore!
>	AND clientID IN (SELECT clientID FROM ToRemove)
>
>And I had not indexed ToRemove in that attempt, so that's the next thing to try.

I don't think you need to check for NOT DELETED(). Even if it deletes the second time, who cares?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform