Hi
The Batch is the whole 250; A transaction for you contains 50 records.
A transaction is defined by the roll back, I.E. 1 transaction has it's own limits, and once succedded it cannot be rolled back; if the next transaction fails the first transaction does not roll back.
Where do you see the second statement 2), this does not seem like it has come from Batchable context, it would appear to be being used in the general form of a batch, it really should be transaction.
To me it looks like you are taking 2) out of context, hard to say.
Not sure what you are referring to as 6 batches, but more than likely they are 5 transactions of 50 and the batchable process kicking off, and I assume in the debug log. Yes they could be "Batched in 50 records per transaction, but they are 1 transaction with 1 overhead, and they are a batch of 250, they are not 1 transaction though, that would imply you can process all 250 in 1 go, but I would imagine not as you would hit limits hence you have contained them in tracasaction of 50 records.
A batch is a turn of phrase.
in debug no reference to batches
Number of SOQL queries: 50 out of 100Number of query rows: 1700 out of 50000Number of SOSL queries: 0 out of 20Number of DML statements: 5 out of 150Number of DML rows: 594 out of 10000 Maximum CPU time: 2590 out of 10000 Maximum heap size: 0 out of 6000000Number of callouts: 0 out of 100Number of Email Invocations: 0 out of 10Number of future calls: 0 out of 50Number of queueable jobs added to the queue: 0 out of 50Number of Mobile Apex push calls: 0 out of 10https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm?search_text=transactions"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."
I hope this helps
답변 1개