指定SIZE的ApexBatch

Each execution of a batch Apex job is considered a discrete transaction. For example, a batch Apex job that contains 1,000 records and is executed without the optional scope parameter from Database.executeBatch is considered five transactions of 200 records each. The Apex governor limits are reset for each transaction. If the first transaction succeeds but the second fails, the database updates made in the first transaction are not rolled back.

100条数据执行一次的话,利用下面的参数进行指定
ID jobId = Database.executeBatch(batch, 100);

コメントを残す

メールアドレスが公開されることはありません。