Thanks to all. I figured it would probably be most efficient at the DB level.
Ken. -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of pritch Sent: Thursday, January 09, 2014 4:15 PM To: arslist@ARSLIST.ORG Subject: Re: Cleaning up forms before migration I sometimes put the 'direct sql' into an escalation. Schedule it to run either once, or on a periodic basis to continue to keep things trimmed down. For instance, a weekly escalation that deletes records that are more than xx days or weeks old. As mentioned, the where clause needs to be carefully constructed. ----- Original Message ----- From: "Charlie Lotridge" <lotri...@mcs-sf.com> To: arslist@ARSLIST.ORG Sent: Thursday, January 9, 2014 4:12:38 PM Subject: Re: Cleaning up forms before migration ** Assuming you're planning to delete ALL the data in each of these forms, I agree with Ken & Fred: using TRUNCATE TABLE is the only way to go. If you only want to selectively delete data, well, that's going to be a lot more painful though you still may want to consider using SQL (DELETE FROM) for the operation and carefully construct the WHERE clauses for each of the relevant tables. Deleting 160 million entries through ARS will take forever and would be the least attractive option to me. Either way, absolutely coordinate this with your DBA's as this kind of operation, and the magnitude of the data, will certainly have impact on things like transaction logs. -charlie On Thu, Jan 9, 2014 at 1:02 PM, Grooms, Frederick W < frederick.w.gro...@xo.com > wrote: ** We do it with a truncate table SQL command (since we want to delete everything) Simply find your schema ID for the form in question and Truncate the T, H, and B tables for that ID Fred From: Action Request System discussion list(ARSList) [mailto: arslist@ARSLIST.ORG ] On Behalf Of Cecil, Ken Sent: Thursday, January 09, 2014 2:58 PM To: arslist@ARSLIST.ORG Subject: Cleaning up forms before migration ** We have some backend forms with large amounts of data that we don’t care about and would like to delete before doing a data migration. For example FB:History has over 160 million records. What is the best way to go about deleting data out of the forms that have gotten away from us. I know we should have set up escalations or archiving to prevent this. Obviously deleting them through search and delete is out of the question. If I set up an escalation to do it I think it would kill performance or take forever. How do you guys go about it. Risky SQL? Thanks, Ken Cecil _ARSlist: "Where the Answers Are" and have been for 20 years_ _ARSlist: "Where the Answers Are" and have been for 20 years_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years" ---------------------------------------------------------------------------------------------------------------------------- Confidentiality Requirement: This communication, including any attachment(s), may contain confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, you are hereby notified that you have received this communication in error and any unauthorized review, use, disclosure, dissemination, distribution or copying of it or its contents is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or e-mail and destroy all copies of this communication and any attachments. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years"