tag:blogger.com,1999:blog-28669706.post8089724312450893724..comments2024-03-25T08:33:57.056+01:00Comments on Gustaf's Microsoft Dynamics CRM Blog: Deleting a lot of records fastGustaf Westerlundhttp://www.blogger.com/profile/02522937600083440624noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-28669706.post-15512724878520718122018-02-10T11:54:18.409+01:002018-02-10T11:54:18.409+01:00Yes, Indeed. Playing with the parameters of number...Yes, Indeed. Playing with the parameters of number of threads and number of messages per executemultiple you can probably increase this. Do read the Kingswaysoft blog as they have some excellent info on the throttle settings of Dynamics 365 Online.Gustaf Westerlundhttps://www.blogger.com/profile/02522937600083440624noreply@blogger.comtag:blogger.com,1999:blog-28669706.post-78141596004347637132018-02-09T15:29:52.500+01:002018-02-09T15:29:52.500+01:00Kingswaysofts adapter for SSIS works through the A...Kingswaysofts adapter for SSIS works through the API. Deletes using direct SQL would be a lot faster, and I agree, don't do it, as you risk the integrity of the system. The example above was with Dynamics 365 online and you cannot even get access to the db there so the APK is the only way. Threading is the trick when working with the API though...Gustaf Westerlundhttps://www.blogger.com/profile/02522937600083440624noreply@blogger.comtag:blogger.com,1999:blog-28669706.post-52074096814715680792018-02-09T14:28:05.044+01:002018-02-09T14:28:05.044+01:00As Gustaf has demonstrated you can in crease the t...As Gustaf has demonstrated you can in crease the throttle of the delete operation by creating multiple threads to perform the operation. This is done in a supported way via the API. Plugins and workflows do obviously slow it down but keeping them on is a decision made on a case by case basis. This is actually very easy to do in a simple console app. My current speed record to CRM online over a latent internet connection for data throughput is about 500 records a second which has been sufficient for my integration requirements. Cherokeehttps://www.blogger.com/profile/01289600470630437712noreply@blogger.comtag:blogger.com,1999:blog-28669706.post-80470164968895800232018-02-09T07:25:22.519+01:002018-02-09T07:25:22.519+01:00While I agree that it takes nigh-on forever to del...While I agree that it takes nigh-on forever to delete stuff (I semi-regularly have to bulk delete in excess of 1.5 million records, which most recently took almost 5 days in a non-prod environment), I look at these external options cautiously.<br /><br />I'm always concerned that they do these sort of things in a supported fashion (web service / SDK vs SQL delete). Also, even though it will be faster to delete stuff without workflows and plugins, I still would feel better if those were triggered on delete (or at least having the option). And it's not just plugins and workflows, stuff like cascading deletes should still happen.<br /><br />If this tool uses the web service / SDK to do these deletes, then I'll be very interested in it :-)<br /><br />Do you know whether or not it works like that? I can't find any specific mention of this sort of behaviour on their site (other than "for best performance, disable these things).<br /><br />Perhaps next time I do this, I'll write a little console application to do the "bulk delete" using the normal web service methods and compare the execution time accordingly :-)Anonymoushttps://www.blogger.com/profile/05917734621775285046noreply@blogger.com