Error:Too many DML rows when a DML statement has been executed
|Knowledge Article Number||000004825|
"Error of Too many DML rows when a DML statement has been executed " indicates that you're trying to execute or insert an operation that contains more than 100 records in a single transaction.
In order to resolve this issue, asynchronous method (@future annotation) needs to be used. Asynchronous methods increase the limits to 10,000, but do not scale with batch size (note there is also a limit for the number of asynchronous method invocations per transaction of 10). Please note, @future method runs only there are enough system resources available.