DML Limits are reset when?

Nothing about the trigger context is going to reset the DML Rows limit. If updating 200 Account records consumes on average 3000 DML Rows, then on average you are going to be able to update 666 Account records per transaction in Execute Anonymous (9990 rows). If your 15:1 ratio is very stable, you can reliably use a number near or above 600. If you have high variance, you will want to drop that number lower to reduce limit. If you got 666 Account records through every time it would still take 750 transactions, if you had to drop it to an average of 550 you'd be up to 900 transactions. Even if you are able to complete an average of 6 transactions per minute without any errors, it will take you 2 - 2.5 hours.

If you're weighing that against less than 3 hours of documentation, it sounds like you're doomed to an exercise in tedium either way. However, if you can write the batch in 3 hours, you're way better off. In addition to not dying of boredom, you will have a much lower chance of human error.


In addition to @AdrianLarson's answer, let me point out a commonly-overlooked issue with execute anonymous and triggers

Many triggers are written with static Boolean variables to guard against recursion, for example with this recipe or this SFDC Knowledge Article

But if your execute anonymous does an update on 201+ records in a single transaction (and by definition, execute anonymous is a single transaction), what will happen is this:

  • SFDC will deliver records 1-200 to the trigger
  • The trigger will do its work, setting the static Boolean variable to prevent trigger recursion
  • SFDC will deliver records 201-400 to the trigger
  • The trigger will think it is recursing and DO NOTHING. This will be repeated for records 401...600, 601..800, ...

The comments to the recipe point out this flaw and provide the workaround - keep maps of ids in a static variable to use for recurse check, not a single all-or-nothing boolean static variable

Data Loader doesn't have this problem as each set of 200 records is a separate transaction.

So, in summary, use Execute Anonymously with care, perhaps by executing it successively on no more than 200 records.